pub struct BsvWriter { /* private fields */ }Expand description
A buffer-based writer for Bitcoin protocol binary data.
Wraps a Vec<u8> and provides methods to append fixed-size integers
and VarInt values in little-endian order.
Implementations§
Source§impl BsvWriter
impl BsvWriter
Sourcepub fn with_capacity(capacity: usize) -> Self
pub fn with_capacity(capacity: usize) -> Self
Sourcepub fn write_bytes(&mut self, bytes: &[u8])
pub fn write_bytes(&mut self, bytes: &[u8])
Sourcepub fn write_u16_le(&mut self, val: u16)
pub fn write_u16_le(&mut self, val: u16)
Sourcepub fn write_u32_le(&mut self, val: u32)
pub fn write_u32_le(&mut self, val: u32)
Sourcepub fn write_u64_le(&mut self, val: u64)
pub fn write_u64_le(&mut self, val: u64)
Sourcepub fn write_varint(&mut self, varint: VarInt)
pub fn write_varint(&mut self, varint: VarInt)
Sourcepub fn into_bytes(self) -> Vec<u8> ⓘ
pub fn into_bytes(self) -> Vec<u8> ⓘ
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BsvWriter
impl RefUnwindSafe for BsvWriter
impl Send for BsvWriter
impl Sync for BsvWriter
impl Unpin for BsvWriter
impl UnsafeUnpin for BsvWriter
impl UnwindSafe for BsvWriter
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