mesh_protobuf::table

Trait StructMetadata

Source
pub unsafe trait StructMetadata {
    const NUMBERS: &'static [u32];
    const OFFSETS: &'static [usize];
}
Expand description

Trait for types that can be encoded using TableEncoder.

§Safety

The implementor must ensure that this metadata describes all fields within Self, and that OFFSETS are the correct byte offsets to the fields.

Required Associated Constants§

Source

const NUMBERS: &'static [u32]

The field numbers for each field.

Source

const OFFSETS: &'static [usize]

The byte offset to each field within the struct.

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.

Implementations on Foreign Types§

Source§

impl<'a> StructMetadata for ()

Source§

const NUMBERS: &'static [u32] = _

Source§

const OFFSETS: &'static [usize] = _

Source§

impl<'a, E0> StructMetadata for (E0,)

Source§

const NUMBERS: &'static [u32] = _

Source§

const OFFSETS: &'static [usize] = _

Source§

impl<'a, E0, E1> StructMetadata for (E0, E1)

Source§

const NUMBERS: &'static [u32] = _

Source§

const OFFSETS: &'static [usize] = _

Source§

impl<'a, E0, E1, E2> StructMetadata for (E0, E1, E2)

Source§

const NUMBERS: &'static [u32] = _

Source§

const OFFSETS: &'static [usize] = _

Source§

impl<'a, E0, E1, E2, E3> StructMetadata for (E0, E1, E2, E3)

Source§

const NUMBERS: &'static [u32] = _

Source§

const OFFSETS: &'static [usize] = _

Source§

impl<'a, E0, E1, E2, E3, E4> StructMetadata for (E0, E1, E2, E3, E4)

Source§

const NUMBERS: &'static [u32] = _

Source§

const OFFSETS: &'static [usize] = _

Source§

impl<'a, E0, E1, E2, E3, E4, E5> StructMetadata for (E0, E1, E2, E3, E4, E5)

Source§

const NUMBERS: &'static [u32] = _

Source§

const OFFSETS: &'static [usize] = _

Source§

impl<'a, E0, E1, E2, E3, E4, E5, E6> StructMetadata for (E0, E1, E2, E3, E4, E5, E6)

Source§

const NUMBERS: &'static [u32] = _

Source§

const OFFSETS: &'static [usize] = _

Source§

impl<T> StructMetadata for Range<T>

Source§

const NUMBERS: &'static [u32] = _

Source§

const OFFSETS: &'static [usize] = _

Implementors§

Source§

impl StructMetadata for ProtobufAny

Source§

const NUMBERS: &'static [u32] = _

Source§

const OFFSETS: &'static [usize] = _

Source§

impl StructMetadata for Timestamp

Source§

const NUMBERS: &'static [u32] = _

Source§

const OFFSETS: &'static [usize] = _