pub struct ByteBuf<T> { /* private fields */ }Expand description
A java-like wrapper over a buffer of bytes.
Implementations§
source§impl<T: AsMut<[u8]>> ByteBuf<T>
impl<T: AsMut<[u8]>> ByteBuf<T>
sourcepub fn set_le<V: WriteBytes>(&mut self, pos: usize, value: V) -> &mut Self
pub fn set_le<V: WriteBytes>(&mut self, pos: usize, value: V) -> &mut Self
Write the given little-endian value field at the given pos offset in bytes.
sourcepub fn set_be<V: WriteBytes>(&mut self, pos: usize, value: V) -> &mut Self
pub fn set_be<V: WriteBytes>(&mut self, pos: usize, value: V) -> &mut Self
Write the given big-endian value field at the given pos offset in bytes.
Trait Implementations§
Auto Trait Implementations§
impl<T> RefUnwindSafe for ByteBuf<T>where T: RefUnwindSafe,
impl<T> Send for ByteBuf<T>where T: Send,
impl<T> Sync for ByteBuf<T>where T: Sync,
impl<T> Unpin for ByteBuf<T>where T: Unpin,
impl<T> UnwindSafe for ByteBuf<T>where T: UnwindSafe,
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