Trait mesh::message::MeshPayload

source ·
pub trait MeshPayload:
    Sized
    + DefaultEncoding<Encoding = Self::Encoding>
    + Send
    + 'static {
    type Encoding: MessageEncode<Self, Resource> + for<'a> MessageDecode<'a, Self, Resource> + FieldEncode<Self, Resource> + for<'a> FieldDecode<'a, Self, Resource> + Send + Sync;
}
Expand description

Trait for types that can be constructed as a Message.

This does not include scalar types such as u32, which are encoded as non-message types.

Required Associated Types§

source

type Encoding: MessageEncode<Self, Resource> + for<'a> MessageDecode<'a, Self, Resource> + FieldEncode<Self, Resource> + for<'a> FieldDecode<'a, Self, Resource> + Send + Sync

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<T> MeshPayload for T
where T: DefaultEncoding + Any + Send + 'static, <T as DefaultEncoding>::Encoding: MessageEncode<T, Resource> + for<'a> MessageDecode<'a, T, Resource> + FieldEncode<T, Resource> + for<'a> FieldDecode<'a, T, Resource> + Send + Sync,