pub struct Encoder { /* private fields */ }Expand description
Binary TLV encoder.
Implementations§
Source§impl Encoder
impl Encoder
Sourcepub fn with_capacity(cap: usize) -> Self
pub fn with_capacity(cap: usize) -> Self
Creates an encoder with pre-allocated capacity.
Sourcepub fn public_key(&mut self, pk: &PublicKeyBytes)
pub fn public_key(&mut self, pk: &PublicKeyBytes)
Encodes a 32-byte public key (no length prefix, fixed size).
Sourcepub fn signature(&mut self, sig: &SignatureBytes)
pub fn signature(&mut self, sig: &SignatureBytes)
Encodes a 64-byte signature (no length prefix, fixed size).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Encoder
impl RefUnwindSafe for Encoder
impl Send for Encoder
impl Sync for Encoder
impl Unpin for Encoder
impl UnwindSafe for Encoder
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