Trait prost::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

Type name for this Message. This is the camel case name, e.g. TypeName.

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

Full name of this message type containing both the package name and type name, e.g. google.protobuf.TypeName.

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.

Implementors§