Skip to main content

Message

Trait Message 

Source
pub trait Message: BinaryEncodable + MessageType {
    // Required methods
    fn request_handle(&self) -> u32;
    fn decode_by_object_id<S>(
        stream: &mut S,
        object_id: ObjectId,
        ctx: &Context<'_>,
    ) -> Result<Self, Error>
       where S: Read,
             Self: Sized;
    fn type_id(&self) -> NodeId;
}
Expand description

Trait implemented by messages.

Required Methods§

Source

fn request_handle(&self) -> u32

Get the message request handle.

Source

fn decode_by_object_id<S>( stream: &mut S, object_id: ObjectId, ctx: &Context<'_>, ) -> Result<Self, Error>
where S: Read, Self: Sized,

Decode the message by object ID.

Source

fn type_id(&self) -> NodeId

Get the type ID of the message.

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§