Trait Message

Source
pub trait Message<'a>: SchemaValue<'a> + StructSchema {
    type Response<'b>: OptionalValue<'b>;
    type Error: HandlerCode;
    type Codec: Codec + Default;

    const SELECTOR: MessageSelector;
}
Expand description

The Message trait for invoking messages dynamically.

Required Associated Constants§

Source

const SELECTOR: MessageSelector

The message selector.

Required Associated Types§

Source

type Response<'b>: OptionalValue<'b>

The optional response type.

Source

type Error: HandlerCode

The optional error type.

Source

type Codec: Codec + Default

The codec to use for encoding and decoding 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§