[][src]Struct protofish::context::MessageInfo

pub struct MessageInfo {
    pub name: String,
    pub full_name: String,
    pub self_ref: MessageRef,
    pub fields: BTreeMap<u64, MessageField>,
    pub oneofs: Vec<Oneof>,
    pub inner_types: Vec<InnerType>,
}

Message details

Fields

name: String

Message name.

full_name: String

Full message name, including package and parent type names.

self_ref: MessageRef

MessageRef that references this message.

fields: BTreeMap<u64, MessageField>

Message fields.

oneofs: Vec<Oneof>

oneof structures defined within the message.

inner_types: Vec<InnerType>

References to the inner types defined within this message.

Implementations

impl MessageInfo[src]

pub fn decode(&self, data: &[u8], ctx: &Context) -> MessageValue[src]

Decode a message.

Will panic if the message defined by the MessageRef does not exist in this context. Such panic means the MessageRef came from a different context. The panic is not guaranteed, as a message with an equal MessageRef may exist in multiple contexts.

Trait Implementations

impl Debug for MessageInfo[src]

Auto Trait Implementations

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, 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.