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>
impl<'a> Debug for WriteSenderSlot<'a>
Source§impl<'a> TLVWrite for WriteSenderSlot<'a>
impl<'a> TLVWrite for WriteSenderSlot<'a>
type Position = usize
Source§fn get_tail(&self) -> <WriteSenderSlot<'a> as TLVWrite>::Position
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)
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>
fn write_ctx<T>(&mut self, ctx: u8, value: &T) -> Result<(), Error>
Write
value under a context tag. Read moreSource§fn tlv(&mut self, tag: &TLVTag, value: &TLVValue<'_>) -> Result<(), Error>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>,
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>
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>,
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>,
fn write_raw_data<I>(&mut self, bytes: I) -> Result<(), Error>where
I: IntoIterator<Item = u8>,
Append multiple raw bytes to the TLV stream.
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> 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
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 moreSource§impl<T, I> IntoFallibleInit<T> for Iwhere
I: Init<T>,
impl<T, I> IntoFallibleInit<T> for Iwhere
I: Init<T>,
Source§fn into_fallible<E>(self) -> impl Init<T, E>
fn into_fallible<E>(self) -> impl Init<T, E>
Convert the infallible initializer to a fallible one.
Source§impl<Source, Target> OctetsInto<Target> for Sourcewhere
Target: OctetsFrom<Source>,
impl<Source, Target> OctetsInto<Target> for Sourcewhere
Target: OctetsFrom<Source>,
type Error = <Target as OctetsFrom<Source>>::Error
Source§fn try_octets_into(
self,
) -> Result<Target, <Source as OctetsInto<Target>>::Error>
fn try_octets_into( self, ) -> Result<Target, <Source as OctetsInto<Target>>::Error>
Performs the conversion.
Source§fn octets_into(self) -> Target
fn octets_into(self) -> Target
Performs an infallible conversion.