mesh_node::message

Trait MeshPayload

Source
pub trait MeshPayload: DefaultEncoding<Encoding = Self::Encoding> + Sized {
    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

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§

Source§

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