[−][src]Struct protofish::context::Context
Protofish decoding context.
Contains type information parsed from the files. Required for decoding incoming Protobuf messages.
Implementations
impl Context
[src]
impl Context
[src]
pub fn get_type(&self, full_name: &str) -> Option<&TypeInfo>
[src]
Gets type info by name.
pub fn get_message(&self, full_name: &str) -> Option<&MessageInfo>
[src]
Gets a message type info by name.
pub fn resolve_message(&self, tr: MessageRef) -> &MessageInfo
[src]
Resolves a message reference.
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.
pub fn resolve_enum(&self, tr: EnumRef) -> &EnumInfo
[src]
Resolves a enum reference.
Will panic if the enum defined by the EnumRef
does not exist in this context.
Such panic means the EnumRef
came from a different context. The panic is not
guaranteed, as an enum with an equal EnumRef
may exist in multiple contexts.
pub fn get_service(&self, full_name: &str) -> Option<&Service>
[src]
Gets a service by full name.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Context
impl Send for Context
impl Sync for Context
impl Unpin for Context
impl UnwindSafe for Context
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,