pub struct EncodeStruct<'b, B: Buffer> { /* private fields */ }Expand description
Encodes a structure
Implementations§
Source§impl<'b, B: Buffer> EncodeStruct<'b, B>
impl<'b, B: Buffer> EncodeStruct<'b, B>
Sourcepub fn set_tag(&mut self, tag: &'b [u8])
pub fn set_tag(&mut self, tag: &'b [u8])
Specifies a domain separation tag
Tag will be unambiguously encoded
Sourcepub fn with_tag(self, tag: &'b [u8]) -> Self
pub fn with_tag(self, tag: &'b [u8]) -> Self
Specifies a domain separation tag
Tag will be unambiguously encoded
Sourcepub fn add_field(&mut self, field_name: impl AsRef<[u8]>) -> EncodeValue<'_, B>
pub fn add_field(&mut self, field_name: impl AsRef<[u8]>) -> EncodeValue<'_, B>
Adds a fields to the structure
Returns an encoder that shall be used to encode the fields value
Auto Trait Implementations§
impl<'b, B> Freeze for EncodeStruct<'b, B>
impl<'b, B> RefUnwindSafe for EncodeStruct<'b, B>where
B: RefUnwindSafe,
impl<'b, B> Send for EncodeStruct<'b, B>where
B: Send,
impl<'b, B> Sync for EncodeStruct<'b, B>where
B: Sync,
impl<'b, B> Unpin for EncodeStruct<'b, B>
impl<'b, B> !UnwindSafe for EncodeStruct<'b, B>
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