Skip to main content

WriteSenderSlot

Struct WriteSenderSlot 

Source
pub struct WriteSenderSlot<'a> { /* private fields */ }
Expand description

Internal serialization handle for the in-flight build of a WriteSender. See InvokeSenderSlot for the design rationale.

Trait Implementations§

Source§

impl<'a> Debug for WriteSenderSlot<'a>

Source§

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

Formats the value using the given formatter. Read more
Source§

impl<'a> TLVWrite for WriteSenderSlot<'a>

Source§

type Position = usize

Source§

fn write(&mut self, byte: u8) -> Result<(), Error>

Append a single byte to the TLV stream.
Source§

fn get_tail(&self) -> <WriteSenderSlot<'a> as TLVWrite>::Position

Get the current position in the TLV stream. Read more
Source§

fn rewind_to(&mut self, pos: <WriteSenderSlot<'a> as TLVWrite>::Position)

Rewind the TLV stream to a previous position. Read more
Source§

fn write_ctx<T>(&mut self, ctx: u8, value: &T) -> Result<(), Error>
where T: ToTLV, Self: Sized,

Write value under a context tag. Read more
Source§

fn tlv(&mut self, tag: &TLVTag, value: &TLVValue<'_>) -> Result<(), Error>

Write a TLV tag and value to the TLV stream.
Source§

fn i8(&mut self, tag: &TLVTag, data: i8) -> Result<(), Error>

Write a tag and a TLV S8 value to the TLV stream.
Source§

fn u8(&mut self, tag: &TLVTag, data: u8) -> Result<(), Error>

Write a tag and a TLV U8 value to the TLV stream.
Source§

fn i16(&mut self, tag: &TLVTag, data: i16) -> Result<(), Error>

Write a tag and a TLV S16 or (if the data is small enough) S8 value to the TLV stream.
Source§

fn u16(&mut self, tag: &TLVTag, data: u16) -> Result<(), Error>

Write a tag and a TLV U16 or (if the data is small enough) U8 value to the TLV stream.
Source§

fn i32(&mut self, tag: &TLVTag, data: i32) -> Result<(), Error>

Write a tag and a TLV S32 or (if the data is small enough) S16 or S8 value to the TLV stream.
Source§

fn u32(&mut self, tag: &TLVTag, data: u32) -> Result<(), Error>

Write a tag and a TLV U32 or (if the data is small enough) U16 or U8 value to the TLV stream.
Source§

fn i64(&mut self, tag: &TLVTag, data: i64) -> Result<(), Error>

Write a tag and a TLV S64 or (if the data is small enough) S32, S16, or S8 value to the TLV stream.
Source§

fn u64(&mut self, tag: &TLVTag, data: u64) -> Result<(), Error>

Write a tag and a TLV U64 or (if the data is small enough) U32, U16, or U8 value to the TLV stream.
Source§

fn f32(&mut self, tag: &TLVTag, data: f32) -> Result<(), Error>

Write a tag and a TLV F32 to the TLV stream.
Source§

fn f64(&mut self, tag: &TLVTag, data: f64) -> Result<(), Error>

Write a tag and a TLV F64 to the TLV stream.
Source§

fn str(&mut self, tag: &TLVTag, data: &[u8]) -> Result<(), Error>

Write a tag and a TLV Octet String to the TLV stream, where the Octet String is a slice of u8 bytes. Read more
Source§

fn str_cb( &mut self, _tag: &TLVTag, _cb: impl FnOnce(&mut [u8]) -> Result<usize, Error>, ) -> Result<(), Error>

Write a tag and a TLV Octet String to the TLV stream, where the Octet String is a slice of u8 bytes. Read more
Source§

fn stri<I>(&mut self, tag: &TLVTag, len: usize, data: I) -> Result<(), Error>
where I: IntoIterator<Item = u8>,

Write a tag and a TLV Octet String to the TLV stream, where the Octet String is anything that can be turned into an iterator of u8 bytes. Read more
Source§

fn utf8(&mut self, tag: &TLVTag, data: &str) -> Result<(), Error>

Write a tag and a TLV UTF-8 String to the TLV stream, where the UTF-8 String is a str. Read more
Source§

fn utf8i<I>(&mut self, tag: &TLVTag, len: usize, data: I) -> Result<(), Error>
where I: IntoIterator<Item = u8>,

Write a tag and a TLV UTF-8 String to the TLV stream, where the UTF-8 String is anything that can be turned into an iterator of u8 bytes. Read more
Source§

fn utf8_cb( &mut self, _tag: &TLVTag, _cb: impl FnOnce(&mut [u8]) -> Result<usize, Error>, ) -> Result<(), Error>

Write a tag and a TLV UTF-8 String to the TLV stream, where the UTF-8 String is a str. Read more
Source§

fn start_struct(&mut self, tag: &TLVTag) -> Result<(), Error>

Write a tag and a value indicating the start of a Struct TLV container. Read more
Source§

fn start_array(&mut self, tag: &TLVTag) -> Result<(), Error>

Write a tag and a value indicating the start of an Array TLV container. Read more
Source§

fn start_list(&mut self, tag: &TLVTag) -> Result<(), Error>

Write a tag and a value indicating the start of a List TLV container. Read more
Source§

fn start_container( &mut self, tag: &TLVTag, container_type: TLVValueType, ) -> Result<(), Error>

Write a tag and a value indicating the start of a Struct TLV container. Read more
Source§

fn end_container(&mut self) -> Result<(), Error>

Write a value indicating the end of a Struct, Array, or List TLV container. Read more
Source§

fn null(&mut self, tag: &TLVTag) -> Result<(), Error>

Write a tag and a TLV Null value to the TLV stream.
Source§

fn bool(&mut self, tag: &TLVTag, val: bool) -> Result<(), Error>

Write a tag and a TLV True or False value to the TLV stream.
Source§

fn raw_value( &mut self, tag: &TLVTag, value_type: TLVValueType, value_payload: &[u8], ) -> Result<(), Error>

Write a tag and a raw, already-encoded TLV value represented as a byte slice.
Source§

fn write_raw_data<I>(&mut self, bytes: I) -> Result<(), Error>
where I: IntoIterator<Item = u8>,

Append multiple raw bytes to the TLV stream.
Source§

fn available_space(&mut self) -> &mut [u8]

Get a mutable slice of the available space in the TLV stream. Read more

Auto Trait Implementations§

§

impl<'a> !RefUnwindSafe for WriteSenderSlot<'a>

§

impl<'a> !Send for WriteSenderSlot<'a>

§

impl<'a> !Sync for WriteSenderSlot<'a>

§

impl<'a> !UnwindSafe for WriteSenderSlot<'a>

§

impl<'a> Freeze for WriteSenderSlot<'a>

§

impl<'a> Unpin for WriteSenderSlot<'a>

§

impl<'a> UnsafeUnpin for WriteSenderSlot<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, E> Init<T, E> for T

Source§

unsafe fn __init(self, slot: *mut T) -> Result<(), E>

Initializes slot. Read more
Source§

fn chain<F>(self, f: F) -> ChainInit<Self, F, T, E>
where F: FnOnce(&mut T) -> Result<(), E>,

First initializes the value using self then calls the function f with the initialized value. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T, I> IntoFallibleInit<T> for I
where I: Init<T>,

Source§

fn into_fallible<E>(self) -> impl Init<T, E>

Convert the infallible initializer to a fallible one.
Source§

impl<Source, Target> OctetsInto<Target> for Source
where Target: OctetsFrom<Source>,

Source§

type Error = <Target as OctetsFrom<Source>>::Error

Source§

fn try_octets_into( self, ) -> Result<Target, <Source as OctetsInto<Target>>::Error>

Performs the conversion.
Source§

fn octets_into(self) -> Target
where Self::Error: Into<Infallible>,

Performs an infallible conversion.
Source§

impl<T, E> PinInit<T, E> for T

Source§

unsafe fn __pinned_init(self, slot: *mut T) -> Result<(), E>

Initializes slot. Read more
Source§

fn pin_chain<F>(self, f: F) -> ChainPinInit<Self, F, T, E>
where F: FnOnce(Pin<&mut T>) -> Result<(), E>,

First initializes the value using self then calls the function f with the initialized value. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V