prost

Trait Name

Source
pub trait Name: Message {
    const NAME: &'static str;
    const PACKAGE: &'static str;

    // Provided methods
    fn full_name() -> String { ... }
    fn type_url() -> String { ... }
}
Expand description

Associate a type name with a Message type.

Required Associated Constants§

Source

const NAME: &'static str

Simple name for this Message. This name is the same as it appears in the source .proto file, e.g. FooBar.

Source

const PACKAGE: &'static str

Package name this message type is contained in. They are domain-like and delimited by ., e.g. google.protobuf.

Provided Methods§

Source

fn full_name() -> String

Fully-qualified unique name for this Message. It’s prefixed with the package name and names of any parent messages, e.g. google.rpc.BadRequest.FieldViolation. By default, this is the package name followed by the message name. Fully-qualified names must be unique within a domain of Type URLs.

Source

fn type_url() -> String

Type URL for this Message, which by default is the full name with a leading slash, but may also include a leading domain name, e.g. type.googleapis.com/google.profile.Person. This can be used when serializing into the google.protobuf.Any type.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl Name for bool

google.protobuf.BoolValue

Source§

const NAME: &'static str = "BoolValue"

Source§

const PACKAGE: &'static str = "google.protobuf"

Source§

fn type_url() -> String

Source§

impl Name for f32

google.protobuf.FloatValue

Source§

const NAME: &'static str = "FloatValue"

Source§

const PACKAGE: &'static str = "google.protobuf"

Source§

fn type_url() -> String

Source§

impl Name for f64

google.protobuf.DoubleValue

Source§

const NAME: &'static str = "DoubleValue"

Source§

const PACKAGE: &'static str = "google.protobuf"

Source§

fn type_url() -> String

Source§

impl Name for i32

google.protobuf.Int32Value

Source§

const NAME: &'static str = "Int32Value"

Source§

const PACKAGE: &'static str = "google.protobuf"

Source§

fn type_url() -> String

Source§

impl Name for i64

google.protobuf.Int64Value

Source§

const NAME: &'static str = "Int64Value"

Source§

const PACKAGE: &'static str = "google.protobuf"

Source§

fn type_url() -> String

Source§

impl Name for u32

google.protobuf.UInt32Value

Source§

const NAME: &'static str = "UInt32Value"

Source§

const PACKAGE: &'static str = "google.protobuf"

Source§

fn type_url() -> String

Source§

impl Name for u64

google.protobuf.UInt64Value

Source§

const NAME: &'static str = "UInt64Value"

Source§

const PACKAGE: &'static str = "google.protobuf"

Source§

fn type_url() -> String

Source§

impl Name for ()

google.protobuf.Empty

Source§

const NAME: &'static str = "Empty"

Source§

const PACKAGE: &'static str = "google.protobuf"

Source§

fn type_url() -> String

Source§

impl Name for Bytes

google.protobuf.BytesValue

Source§

const NAME: &'static str = "BytesValue"

Source§

const PACKAGE: &'static str = "google.protobuf"

Source§

fn type_url() -> String

Source§

impl Name for String

google.protobuf.StringValue

Source§

const NAME: &'static str = "StringValue"

Source§

const PACKAGE: &'static str = "google.protobuf"

Source§

fn type_url() -> String

Source§

impl Name for Vec<u8>

google.protobuf.BytesValue

Source§

const NAME: &'static str = "BytesValue"

Source§

const PACKAGE: &'static str = "google.protobuf"

Source§

fn type_url() -> String

Implementors§