#[repr(transparent)]
pub struct MultiFieldsULE(_);
Expand description

This type is used by the custom derive to represent multiple VarULE fields packed into a single end-of-struct field. It is not recommended to use this type directly.

Logically, consider it to be (V1, V2, V3, ..) where V1 etc are potentially different VarULE types.

Internally, it is represented by a VarZeroSlice.

Implementations

Compute the amount of bytes needed to support elements with lengths lengths

Construct a partially initialized MultiFieldsULE backed by a mutable byte buffer

Given a buffer of size obtained by Self::compute_encoded_len_for(), write element A to index idx

Safety
  • idx must be in range
  • T must be the appropriate type expected by the custom derive in this usage of this type

Validate field at index to see if it is a valid T VarULE type

Safety
  • index must be in range

Get field at index as a value of type T

Safety
  • index must be in range
  • Element at index must have been created with the VarULE type T

Construct from a byte slice

Safety
  • byte slice must be a valid VarZeroSlice<u8>

Trait Implementations

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Note: MultiFieldsULE is usually used in cases where one should be calling .validate_field() directly for each field, rather than using the regular VarULE impl.

This impl exists so that EncodeAsVarULE can work.

Takes a byte slice, &[u8], and return it as &Self with the same lifetime, assuming that this byte slice has previously been run through Self::parse_byte_slice() with success. Read more

Parses a byte slice, &[u8], and return it as &Self with the same lifetime. Read more

Given &Self, returns a &[u8] with the same lifetime. Read more

Allocate on the heap as a Box<T>

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more