Skip to main content

ReflectMessageView

Trait ReflectMessageView 

Source
pub trait ReflectMessageView<'a>: MessageView<'a> {
    // Required method
    fn descriptor(&self) -> MessageDescriptor;
}
Expand description

Reflection over a buffa view type. Implemented by every generated *View<'a> so the zero-copy decode path can introspect the message without allocating an owned form.

descriptor() returns the same MessageDescriptor the owned ReflectMessage returns for the same proto.

Required Methods§

Source

fn descriptor(&self) -> MessageDescriptor

Resolve the MessageDescriptor for this view’s proto 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.

Implementors§