Type Alias WireTransfer

Source
pub type WireTransfer<'de> = WireVector<'de, u8>;
Expand description

The wire type corresponding to Transfer.

Aliased Type§

struct WireTransfer<'de> { /* private fields */ }

Implementations

§

impl<T> WireVector<'_, T>

pub fn encode_present(out: &mut MaybeUninit<WireVector<'_, T>>, len: u64)

Encodes that a vector is present in a slot.

pub fn len(&self) -> usize

Returns the length of the vector in elements.

pub fn is_empty(&self) -> bool

Returns whether the vector is empty.

pub fn as_slice(&self) -> &[T]

Returns a slice of the elements of the vector.

pub unsafe fn decode_raw<D>( slot: Slot<'_, WireVector<'_, T>>, decoder: &mut D, ) -> Result<(), DecodeError>
where D: Decoder + ?Sized, T: Decode<D>,

Decodes a wire vector which contains raw data.

§Safety

The elements of the wire vector must not need to be individually decoded, and must always be valid.

Trait Implementations

§

impl<T> Debug for WireVector<'_, T>
where T: Debug,

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<D, T> Decode<D> for WireVector<'static, T>
where D: Decoder + ?Sized, T: Decode<D>,

§

fn decode( slot: Slot<'_, WireVector<'static, T>>, decoder: &mut D, ) -> Result<(), DecodeError>

Decodes a value into a slot using a decoder. Read more
§

impl<T> Deref for WireVector<'_, T>

§

type Target = [T]

The resulting type after dereferencing.
§

fn deref(&self) -> &<WireVector<'_, T> as Deref>::Target

Dereferences the value.
§

impl<T> Drop for WireVector<'_, T>

§

fn drop(&mut self)

Executes the destructor for this type. Read more
§

impl<'de, T> IntoIterator for WireVector<'de, T>

§

type IntoIter = IntoIter<'de, T>

Which kind of iterator are we turning this into?
§

type Item = T

The type of the elements being iterated over.
§

fn into_iter(self) -> <WireVector<'de, T> as IntoIterator>::IntoIter

Creates an iterator from a value. Read more
§

impl<T> Wire for WireVector<'static, T>
where T: Wire,

§

type Decoded<'de> = WireVector<'de, <T as Wire>::Decoded<'de>>

The decoded wire type, restricted to the 'de lifetime.
§

fn zero_padding(out: &mut MaybeUninit<WireVector<'static, T>>)

Writes zeroes to the padding for this type, if any.