[][src]Struct prost_types::Option

pub struct Option {
    pub name: String,
    pub value: Option<Any>,
}

A protocol buffer option, which can be attached to a message, field, enumeration, etc.

Fields

name: String

The option's name. For protobuf built-in options (options defined in descriptor.proto), this is the short name. For example, "map_entry". For custom options, it should be the fully-qualified name. For example, "google.api.http".

value: Option<Any>

The option's value packed in an Any message. If the value is a primitive, the corresponding wrapper type defined in google/protobuf/wrappers.proto should be used. If the value is an enum, it should be stored as an int32 value using the google.protobuf.Int32Value type.

Trait Implementations

impl Clone for Option[src]

impl Debug for Option[src]

impl Default for Option[src]

impl Message for Option[src]

impl PartialEq<Option> for Option[src]

impl StructuralPartialEq for Option[src]

Auto Trait Implementations

impl RefUnwindSafe for Option

impl Send for Option

impl Sync for Option

impl Unpin for Option

impl UnwindSafe for Option

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.