Struct mesh::payload::table::TableEncoder
source · pub struct TableEncoder;
Expand description
A message encoder/decoder that uses tables associated with the message type.
Trait Implementations§
source§impl DescribeField<()> for TableEncoder
impl DescribeField<()> for TableEncoder
source§const FIELD_TYPE: FieldType<'static> = _
const FIELD_TYPE: FieldType<'static> = _
The type of the field.
source§const PACKED_TYPE: Option<&'static str> = None
const PACKED_TYPE: Option<&'static str> = None
The type name of the field in a packed context.
source§impl<E0> DescribeField<(E0,)> for TableEncoder
impl<E0> DescribeField<(E0,)> for TableEncoder
source§const FIELD_TYPE: FieldType<'static> = _
const FIELD_TYPE: FieldType<'static> = _
The type of the field.
source§const PACKED_TYPE: Option<&'static str> = None
const PACKED_TYPE: Option<&'static str> = None
The type name of the field in a packed context.
source§impl<E0, E1> DescribeField<(E0, E1)> for TableEncoderwhere
E0: DefaultEncoding,
E1: DefaultEncoding,
<E0 as DefaultEncoding>::Encoding: DescribeField<E0>,
<E1 as DefaultEncoding>::Encoding: DescribeField<E1>,
impl<E0, E1> DescribeField<(E0, E1)> for TableEncoderwhere
E0: DefaultEncoding,
E1: DefaultEncoding,
<E0 as DefaultEncoding>::Encoding: DescribeField<E0>,
<E1 as DefaultEncoding>::Encoding: DescribeField<E1>,
source§const FIELD_TYPE: FieldType<'static> = _
const FIELD_TYPE: FieldType<'static> = _
The type of the field.
source§const PACKED_TYPE: Option<&'static str> = None
const PACKED_TYPE: Option<&'static str> = None
The type name of the field in a packed context.
source§impl<E0, E1, E2> DescribeField<(E0, E1, E2)> for TableEncoderwhere
E0: DefaultEncoding,
E1: DefaultEncoding,
E2: DefaultEncoding,
<E0 as DefaultEncoding>::Encoding: DescribeField<E0>,
<E1 as DefaultEncoding>::Encoding: DescribeField<E1>,
<E2 as DefaultEncoding>::Encoding: DescribeField<E2>,
impl<E0, E1, E2> DescribeField<(E0, E1, E2)> for TableEncoderwhere
E0: DefaultEncoding,
E1: DefaultEncoding,
E2: DefaultEncoding,
<E0 as DefaultEncoding>::Encoding: DescribeField<E0>,
<E1 as DefaultEncoding>::Encoding: DescribeField<E1>,
<E2 as DefaultEncoding>::Encoding: DescribeField<E2>,
source§const FIELD_TYPE: FieldType<'static> = _
const FIELD_TYPE: FieldType<'static> = _
The type of the field.
source§const PACKED_TYPE: Option<&'static str> = None
const PACKED_TYPE: Option<&'static str> = None
The type name of the field in a packed context.
source§impl<E0, E1, E2, E3> DescribeField<(E0, E1, E2, E3)> for TableEncoderwhere
E0: DefaultEncoding,
E1: DefaultEncoding,
E2: DefaultEncoding,
E3: DefaultEncoding,
<E0 as DefaultEncoding>::Encoding: DescribeField<E0>,
<E1 as DefaultEncoding>::Encoding: DescribeField<E1>,
<E2 as DefaultEncoding>::Encoding: DescribeField<E2>,
<E3 as DefaultEncoding>::Encoding: DescribeField<E3>,
impl<E0, E1, E2, E3> DescribeField<(E0, E1, E2, E3)> for TableEncoderwhere
E0: DefaultEncoding,
E1: DefaultEncoding,
E2: DefaultEncoding,
E3: DefaultEncoding,
<E0 as DefaultEncoding>::Encoding: DescribeField<E0>,
<E1 as DefaultEncoding>::Encoding: DescribeField<E1>,
<E2 as DefaultEncoding>::Encoding: DescribeField<E2>,
<E3 as DefaultEncoding>::Encoding: DescribeField<E3>,
source§const FIELD_TYPE: FieldType<'static> = _
const FIELD_TYPE: FieldType<'static> = _
The type of the field.
source§const PACKED_TYPE: Option<&'static str> = None
const PACKED_TYPE: Option<&'static str> = None
The type name of the field in a packed context.
source§impl<E0, E1, E2, E3, E4> DescribeField<(E0, E1, E2, E3, E4)> for TableEncoderwhere
E0: DefaultEncoding,
E1: DefaultEncoding,
E2: DefaultEncoding,
E3: DefaultEncoding,
E4: DefaultEncoding,
<E0 as DefaultEncoding>::Encoding: DescribeField<E0>,
<E1 as DefaultEncoding>::Encoding: DescribeField<E1>,
<E2 as DefaultEncoding>::Encoding: DescribeField<E2>,
<E3 as DefaultEncoding>::Encoding: DescribeField<E3>,
<E4 as DefaultEncoding>::Encoding: DescribeField<E4>,
impl<E0, E1, E2, E3, E4> DescribeField<(E0, E1, E2, E3, E4)> for TableEncoderwhere
E0: DefaultEncoding,
E1: DefaultEncoding,
E2: DefaultEncoding,
E3: DefaultEncoding,
E4: DefaultEncoding,
<E0 as DefaultEncoding>::Encoding: DescribeField<E0>,
<E1 as DefaultEncoding>::Encoding: DescribeField<E1>,
<E2 as DefaultEncoding>::Encoding: DescribeField<E2>,
<E3 as DefaultEncoding>::Encoding: DescribeField<E3>,
<E4 as DefaultEncoding>::Encoding: DescribeField<E4>,
source§const FIELD_TYPE: FieldType<'static> = _
const FIELD_TYPE: FieldType<'static> = _
The type of the field.
source§const PACKED_TYPE: Option<&'static str> = None
const PACKED_TYPE: Option<&'static str> = None
The type name of the field in a packed context.
source§impl<E0, E1, E2, E3, E4, E5> DescribeField<(E0, E1, E2, E3, E4, E5)> for TableEncoderwhere
E0: DefaultEncoding,
E1: DefaultEncoding,
E2: DefaultEncoding,
E3: DefaultEncoding,
E4: DefaultEncoding,
E5: DefaultEncoding,
<E0 as DefaultEncoding>::Encoding: DescribeField<E0>,
<E1 as DefaultEncoding>::Encoding: DescribeField<E1>,
<E2 as DefaultEncoding>::Encoding: DescribeField<E2>,
<E3 as DefaultEncoding>::Encoding: DescribeField<E3>,
<E4 as DefaultEncoding>::Encoding: DescribeField<E4>,
<E5 as DefaultEncoding>::Encoding: DescribeField<E5>,
impl<E0, E1, E2, E3, E4, E5> DescribeField<(E0, E1, E2, E3, E4, E5)> for TableEncoderwhere
E0: DefaultEncoding,
E1: DefaultEncoding,
E2: DefaultEncoding,
E3: DefaultEncoding,
E4: DefaultEncoding,
E5: DefaultEncoding,
<E0 as DefaultEncoding>::Encoding: DescribeField<E0>,
<E1 as DefaultEncoding>::Encoding: DescribeField<E1>,
<E2 as DefaultEncoding>::Encoding: DescribeField<E2>,
<E3 as DefaultEncoding>::Encoding: DescribeField<E3>,
<E4 as DefaultEncoding>::Encoding: DescribeField<E4>,
<E5 as DefaultEncoding>::Encoding: DescribeField<E5>,
source§const FIELD_TYPE: FieldType<'static> = _
const FIELD_TYPE: FieldType<'static> = _
The type of the field.
source§const PACKED_TYPE: Option<&'static str> = None
const PACKED_TYPE: Option<&'static str> = None
The type name of the field in a packed context.
source§impl<E0, E1, E2, E3, E4, E5, E6> DescribeField<(E0, E1, E2, E3, E4, E5, E6)> for TableEncoderwhere
E0: DefaultEncoding,
E1: DefaultEncoding,
E2: DefaultEncoding,
E3: DefaultEncoding,
E4: DefaultEncoding,
E5: DefaultEncoding,
E6: DefaultEncoding,
<E0 as DefaultEncoding>::Encoding: DescribeField<E0>,
<E1 as DefaultEncoding>::Encoding: DescribeField<E1>,
<E2 as DefaultEncoding>::Encoding: DescribeField<E2>,
<E3 as DefaultEncoding>::Encoding: DescribeField<E3>,
<E4 as DefaultEncoding>::Encoding: DescribeField<E4>,
<E5 as DefaultEncoding>::Encoding: DescribeField<E5>,
<E6 as DefaultEncoding>::Encoding: DescribeField<E6>,
impl<E0, E1, E2, E3, E4, E5, E6> DescribeField<(E0, E1, E2, E3, E4, E5, E6)> for TableEncoderwhere
E0: DefaultEncoding,
E1: DefaultEncoding,
E2: DefaultEncoding,
E3: DefaultEncoding,
E4: DefaultEncoding,
E5: DefaultEncoding,
E6: DefaultEncoding,
<E0 as DefaultEncoding>::Encoding: DescribeField<E0>,
<E1 as DefaultEncoding>::Encoding: DescribeField<E1>,
<E2 as DefaultEncoding>::Encoding: DescribeField<E2>,
<E3 as DefaultEncoding>::Encoding: DescribeField<E3>,
<E4 as DefaultEncoding>::Encoding: DescribeField<E4>,
<E5 as DefaultEncoding>::Encoding: DescribeField<E5>,
<E6 as DefaultEncoding>::Encoding: DescribeField<E6>,
source§const FIELD_TYPE: FieldType<'static> = _
const FIELD_TYPE: FieldType<'static> = _
The type of the field.
source§const PACKED_TYPE: Option<&'static str> = None
const PACKED_TYPE: Option<&'static str> = None
The type name of the field in a packed context.
source§impl<T> DescribeField<T> for TableEncoderwhere
T: DescribeTable,
impl<T> DescribeField<T> for TableEncoderwhere
T: DescribeTable,
source§const FIELD_TYPE: FieldType<'static> = _
const FIELD_TYPE: FieldType<'static> = _
The type of the field.
source§const PACKED_TYPE: Option<&'static str> = None
const PACKED_TYPE: Option<&'static str> = None
The type name of the field in a packed context.
source§impl DescribeMessage<()> for TableEncoder
impl DescribeMessage<()> for TableEncoder
source§const DESCRIPTION: MessageDescription<'static> = _
const DESCRIPTION: MessageDescription<'static> = _
The message description.
source§impl<T> DescribeMessage<T> for TableEncoderwhere
T: DescribeTable,
impl<T> DescribeMessage<T> for TableEncoderwhere
T: DescribeTable,
source§const DESCRIPTION: MessageDescription<'static> = T::DESCRIPTION
const DESCRIPTION: MessageDescription<'static> = T::DESCRIPTION
The message description.
source§impl<'de, T, R> FieldDecode<'de, T, R> for TableEncoderwhere
T: StructDecodeMetadata<'de, R>,
impl<'de, T, R> FieldDecode<'de, T, R> for TableEncoderwhere
T: StructDecodeMetadata<'de, R>,
source§const ENTRY: DecoderEntry<'de, T, R> = _
const ENTRY: DecoderEntry<'de, T, R> = _
The table decoder entry for this type, used in types from
table::decode
. Read moresource§fn read_field(
item: &mut InplaceOption<'_, T>,
reader: FieldReader<'de, '_, R>,
) -> Result<(), Error>
fn read_field( item: &mut InplaceOption<'_, T>, reader: FieldReader<'de, '_, R>, ) -> Result<(), Error>
Reads a field into
item
.source§fn default_field(item: &mut InplaceOption<'_, T>) -> Result<(), Error>
fn default_field(item: &mut InplaceOption<'_, T>) -> Result<(), Error>
Instantiates
item
with its default value, if there is one. Read moresource§fn packed<'p, C>() -> Option<&'p dyn PackedDecode<'a, T, C>>where
C: CopyExtend<T>,
T: 'p,
fn packed<'p, C>() -> Option<&'p dyn PackedDecode<'a, T, C>>where
C: CopyExtend<T>,
T: 'p,
Unless
packed()::must_pack()
is true, the sequence decoder must detect
the encoding (packed or not) and call the appropriate method.source§fn wrap_in_sequence() -> bool
fn wrap_in_sequence() -> bool
Returns whether this field is wrapped in a message when encoded nested
in a sequence (such as a repeated field).
source§fn read_field_in_sequence(
item: &mut InplaceOption<'_, T>,
reader: FieldReader<'a, '_, R>,
) -> Result<(), Error>
fn read_field_in_sequence( item: &mut InplaceOption<'_, T>, reader: FieldReader<'a, '_, R>, ) -> Result<(), Error>
Reads this field that was encoded as part of a sequence, unwrapping it
from a message if necessary.
source§impl<T, R> FieldEncode<T, R> for TableEncoderwhere
T: StructEncodeMetadata<R>,
impl<T, R> FieldEncode<T, R> for TableEncoderwhere
T: StructEncodeMetadata<R>,
source§const ENTRY: EncoderEntry<T, R> = _
const ENTRY: EncoderEntry<T, R> = _
The table encoder entry for this type, used in types from
table::encode
. Read moresource§fn write_field(item: T, writer: FieldWriter<'_, '_, R>)
fn write_field(item: T, writer: FieldWriter<'_, '_, R>)
Writes
item
as a field.source§fn compute_field_size(item: &mut T, sizer: FieldSizer<'_>)
fn compute_field_size(item: &mut T, sizer: FieldSizer<'_>)
Computes the size of
item
as a field. Read moresource§fn packed<'a>() -> Option<&'a dyn PackedEncode<T>>where
T: 'a,
fn packed<'a>() -> Option<&'a dyn PackedEncode<T>>where
T: 'a,
Returns the encoder for writing multiple instances of this field in a
packed list, or
None
if there is no packed encoding for this type.source§fn wrap_in_sequence() -> bool
fn wrap_in_sequence() -> bool
Returns whether this field should be wrapped in a message when encoded
nested in a sequence (such as a repeated field). Read more
source§fn write_field_in_sequence(item: T, writer: &mut SequenceWriter<'_, '_, R>)
fn write_field_in_sequence(item: T, writer: &mut SequenceWriter<'_, '_, R>)
Writes this field as part of a sequence, wrapping it in a message if
necessary.
source§fn compute_field_size_in_sequence(item: &mut T, sizer: &mut SequenceSizer<'_>)
fn compute_field_size_in_sequence(item: &mut T, sizer: &mut SequenceSizer<'_>)
Computes the size of this field as part of a sequence, including the
size of a wrapping message.
source§impl<'de, T, R> MessageDecode<'de, T, R> for TableEncoderwhere
T: StructDecodeMetadata<'de, R>,
impl<'de, T, R> MessageDecode<'de, T, R> for TableEncoderwhere
T: StructDecodeMetadata<'de, R>,
source§fn read_message(
item: &mut InplaceOption<'_, T>,
reader: MessageReader<'de, '_, R>,
) -> Result<(), Error>
fn read_message( item: &mut InplaceOption<'_, T>, reader: MessageReader<'de, '_, R>, ) -> Result<(), Error>
Reads a message into
item
.source§impl<T, R> MessageEncode<T, R> for TableEncoderwhere
T: StructEncodeMetadata<R>,
impl<T, R> MessageEncode<T, R> for TableEncoderwhere
T: StructEncodeMetadata<R>,
source§fn write_message(item: T, writer: MessageWriter<'_, '_, R>)
fn write_message(item: T, writer: MessageWriter<'_, '_, R>)
Writes
item
as a message.source§fn compute_message_size(item: &mut T, sizer: MessageSizer<'_>)
fn compute_message_size(item: &mut T, sizer: MessageSizer<'_>)
Computes the size of
item
as a message. Read moreAuto Trait Implementations§
impl Freeze for TableEncoder
impl RefUnwindSafe for TableEncoder
impl Send for TableEncoder
impl Sync for TableEncoder
impl Unpin for TableEncoder
impl UnwindSafe for TableEncoder
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more