Struct ChunkWriter

Source
pub struct ChunkWriter<B: ?Sized>(/* private fields */);
Expand description

A wrapper around any type that implements ChunkMut for improved ergonomics in generic code.

ChunkWriter provides a unified interface over different buffer types, making it easier to write generic functions that accept various writable buffer types without requiring complex type signatures or awkward reference patterns.

§Problem Solved

When writing generic functions that accept ChunkMut implementors, you often run into ergonomic issues with reference types. For example, with &mut [u8], callers would need to pass &mut &mut [u8] which is awkward and unintuitive.

§Solution

By using impl Into<ChunkWriter<B>> in your function signatures, callers can pass buffer types naturally without extra reference wrapping:

use bufkit::{ChunkMut, ChunkWriter};

// Instead of this awkward signature:
fn encode_bad<B: ChunkMut>(buf: &mut B) { /* ... */ }

// Use this ergonomic signature:
fn encode_good<B: ChunkMut>(buf: impl Into<ChunkWriter<B>>) { /* ... */ }

// Now callers can write:
let mut buffer = [0u8; 64];
encode_good(&mut buffer[..]);        // Natural - no double reference needed
encode_bad(&mut &mut buffer[..]);    // Awkward - requires &mut &mut

§Common Usage Pattern

This type is particularly useful for encoding/serialization APIs where you want to accept various buffer types:

use bufkit::{ChunkMut, ChunkWriter};

pub trait Encode {
    fn encode<B: ChunkMut>(&self, buf: impl Into<ChunkWriter<B>>) -> Result<usize, Error>;
}

impl Encode for MyStruct {
    fn encode<B: ChunkMut>(&self, buf: impl Into<ChunkWriter<B>>) -> Result<usize, Error> {
        let mut buf = buf.into();
        // Write to buf...
        Ok(bytes_written)
    }
}

// Usage is clean and intuitive:
let my_struct = MyStruct::new();
let mut array_buf = [0u8; 100];

my_struct.encode(&mut array_buf[..])?;  // No &mut &mut needed

§Type Flexibility

ChunkWriter can wrap any type that implements ChunkMut, including:

  • &mut [u8] - Fixed-size byte arrays
  • Other ChunkMut implementors

Implementations§

Source§

impl<B: ?Sized> ChunkWriter<B>

Source

pub const fn as_mut(&mut self) -> ChunkWriter<&mut B>

Similar to Option::as_mut, converts &mut ChunkWriter<B> to ChunkWriter<&mut B>.

§Example
use bufkit::{ChunkMut, ChunkWriter};

let mut buf = [0u8; 24];
let mut write_buf = ChunkWriter::from(&mut buf[..]);
let _ = write_buf.as_mut();
Source

pub const fn as_ref(&self) -> ChunkWriter<&B>

Similar to Option::as_ref, converts &ChunkWriter<B> to ChunkWriter<&B>.

§Example
use bufkit::{ChunkMut, ChunkWriter};

let mut buf = [0u8; 24];
let write_buf = ChunkWriter::from(&mut buf[..]);
let _ = write_buf.as_ref();
Source§

impl<B> ChunkWriter<B>

Source

pub const fn new(buf: B) -> Self

Creates a new ChunkWriter from the given ChunkMut.

Source

pub fn into_inner(self) -> B

Consumes the ChunkWriter and returns the underlying ChunkMut.

§Examples
use bufkit::{ChunkMut, ChunkWriter};

let mut buf = [0u8; 24];
let mut write_buf = ChunkWriter::from(&mut buf[..]);
let _ = write_buf.into_inner();

Trait Implementations§

Source§

impl<B: ?Sized + ChunkMut> ChunkMut for ChunkWriter<B>

Source§

fn has_remaining_mut(&self) -> bool

Returns true if the buffer has available space for writing. Read more
Source§

fn remaining_mut(&self) -> usize

Returns the number of bytes available for writing in the buffer. Read more
Source§

fn advance_mut(&mut self, cnt: usize)

Advances the internal cursor by the specified number of bytes. Read more
Source§

fn try_advance_mut(&mut self, cnt: usize) -> Result<(), TryAdvanceError>

Attempts to advance the internal cursor by the specified number of bytes. Read more
Source§

fn truncate_mut(&mut self, new_len: usize)

Shortens the buffer to the specified length, keeping the first len bytes. Read more
Source§

fn buffer_mut(&mut self) -> &mut [u8]

Returns the entire initialized buffer as a remaining_mut slice. Read more
Source§

fn fill(&mut self, value: u8)

Fills the entire buffer with the specified byte value. Read more
Source§

fn prefix_mut(&mut self, len: usize) -> &mut [u8]

Returns a remaining_mut slice containing the first len bytes of the buffer. Read more
Source§

fn prefix_mut_checked(&mut self, len: usize) -> Option<&mut [u8]>

Returns a remaining_mut slice containing the first len bytes of the buffer. Read more
Source§

fn suffix_mut(&mut self, len: usize) -> &mut [u8]

Returns a remaining_mut slice containing the last len bytes of the buffer. Read more
Source§

fn suffix_mut_checked(&mut self, len: usize) -> Option<&mut [u8]>

Returns a remaining_mut slice containing the last len bytes of the buffer. Read more
Source§

fn split_at_mut(&mut self, mid: usize) -> (&mut [u8], &mut [u8])

Divides the buffer into two remaining_mut slices at the given index. Read more
Source§

fn split_at_mut_checked(&mut self, mid: usize) -> Option<(&mut [u8], &mut [u8])>

Divides the buffer into two remaining_mut slices at the given index. Read more
Source§

fn put_slice(&mut self, slice: &[u8]) -> usize

Puts slice of bytes to the beginning of the buffer without advancing the internal cursor. Read more
Source§

fn put_slice_checked(&mut self, slice: &[u8]) -> Option<usize>

Tries to put slice of bytes to the beginning of the buffer without advancing the internal cursor. Read more
Source§

fn try_put_slice(&mut self, slice: &[u8]) -> Result<usize, TryPutError>

Tries to put slice of bytes to the beginning of the buffer without advancing the internal cursor. Read more
Source§

fn put_slice_at(&mut self, slice: &[u8], offset: usize) -> usize

Puts slice of bytes to the buffer at the specified offset without advancing the internal cursor. Read more
Source§

fn put_slice_at_checked(&mut self, slice: &[u8], offset: usize) -> Option<usize>

Tries to put slice of bytes to the buffer at the specified offset without advancing the internal cursor. Read more
Source§

fn try_put_slice_at( &mut self, slice: &[u8], offset: usize, ) -> Result<usize, TryPutAtError>

Tries to put slice of bytes to the buffer at the specified offset without advancing the internal cursor. Read more
Source§

fn put_u8(&mut self, value: u8) -> usize

Puts u8 value to the beginning of the buffer without advancing the internal cursor. Read more
Source§

fn put_u8_checked(&mut self, value: u8) -> Option<usize>

Tries to put u8 value to the beginning of the buffer without advancing the internal cursor. Read more
Source§

fn try_put_u8(&mut self, value: u8) -> Result<usize, TryPutError>

Tries to put u8 value to the beginning of the buffer without advancing the internal cursor. Read more
Source§

fn put_i8(&mut self, value: i8) -> usize

Puts i8 value to the beginning of the buffer without advancing the internal cursor. Read more
Source§

fn put_i8_checked(&mut self, value: i8) -> Option<usize>

Tries to put i8 value to the beginning of the buffer without advancing the internal cursor. Read more
Source§

fn try_put_i8(&mut self, value: i8) -> Result<usize, TryPutError>

Tries to put i8 value to the beginning of the buffer without advancing the internal cursor. Read more
Source§

fn put_u8_at(&mut self, value: u8, offset: usize) -> usize

Puts u8 value to the buffer at the specified offset without advancing the internal cursor. Read more
Source§

fn put_u8_at_checked(&mut self, value: u8, offset: usize) -> Option<usize>

Tries to put u8 value to the buffer at the specified offset without advancing the internal cursor. Read more
Source§

fn try_put_u8_at( &mut self, value: u8, offset: usize, ) -> Result<usize, TryPutAtError>

Tries to put u8 value to the buffer at the specified offset without advancing the internal cursor. Read more
Source§

fn put_i8_at(&mut self, value: i8, offset: usize) -> usize

Puts i8 value to the buffer at the specified offset without advancing the internal cursor. Read more
Source§

fn put_i8_at_checked(&mut self, value: i8, offset: usize) -> Option<usize>

Tries to put i8 value to the buffer at the specified offset without advancing the internal cursor. Read more
Source§

fn try_put_i8_at( &mut self, value: i8, offset: usize, ) -> Result<usize, TryPutAtError>

Tries to put i8 value to the buffer at the specified offset without advancing the internal cursor. Read more
Source§

fn put_u16_le_at(&mut self, value: u16, offset: usize) -> usize

Puts a u16 value in little-endian byte order to the buffer at the specified offset without advancing the internal cursor. Read more
Source§

fn put_u16_le_at_checked(&mut self, value: u16, offset: usize) -> Option<usize>

Tries to put u16 value in little-endian byte order to the buffer at the specified offset without advancing the internal cursor. Read more
Source§

fn try_put_u16_le_at( &mut self, value: u16, offset: usize, ) -> Result<usize, TryPutAtError>

Tries to put u16 value in little-endian byte order to the buffer at the specified offset without advancing the internal cursor. Read more
Source§

fn put_u16_be_at(&mut self, value: u16, offset: usize) -> usize

Puts u16 value in big-endian byte order to the buffer at the specified offset without advancing the internal cursor. Read more
Source§

fn put_u16_be_at_checked(&mut self, value: u16, offset: usize) -> Option<usize>

Tries to put u16 value in big-endian byte order to the buffer at the specified offset without advancing the internal cursor. Read more
Source§

fn try_put_u16_be_at( &mut self, value: u16, offset: usize, ) -> Result<usize, TryPutAtError>

Tries to put u16 value in big-endian byte order to the buffer at the specified offset without advancing the internal cursor. Read more
Source§

fn put_u16_ne_at(&mut self, value: u16, offset: usize) -> usize

Puts u16 value in native-endian byte order to the buffer at the specified offset without advancing the internal cursor. Read more
Source§

fn put_u16_ne_at_checked(&mut self, value: u16, offset: usize) -> Option<usize>

Tries to put u16 value in native-endian byte order to the buffer at the specified offset without advancing the internal cursor. Read more
Source§

fn try_put_u16_ne_at( &mut self, value: u16, offset: usize, ) -> Result<usize, TryPutAtError>

Tries to put u16 value in native-endian byte order to the buffer at the specified offset without advancing the internal cursor. Read more
Source§

fn put_u16_le(&mut self, value: u16) -> usize

Puts u16 value in little-endian byte order to the beginning of the buffer without advancing the internal cursor. Read more
Source§

fn put_u16_le_checked(&mut self, value: u16) -> Option<usize>

Tries to put u16 value in little-endian byte order to the beginning of the buffer without advancing the internal cursor. Read more
Source§

fn try_put_u16_le(&mut self, value: u16) -> Result<usize, TryPutError>

Tries to put u16 value in little-endian byte order to the beginning of the buffer without advancing the internal cursor. Read more
Source§

fn put_u16_be(&mut self, value: u16) -> usize

Puts a u16 value in big-endian byte order to the beginning of the buffer without advancing the internal cursor. Read more
Source§

fn put_u16_be_checked(&mut self, value: u16) -> Option<usize>

Tries to put u16 value in big-endian byte order to the beginning of the buffer without advancing the internal cursor. Read more
Source§

fn try_put_u16_be(&mut self, value: u16) -> Result<usize, TryPutError>

Tries to put u16 value in big-endian byte order to the beginning of the buffer without advancing the internal cursor. Read more
Source§

fn put_u16_ne(&mut self, value: u16) -> usize

Puts u16 value in native-endian byte order to the beginning of the buffer without advancing the internal cursor. Read more
Source§

fn put_u16_ne_checked(&mut self, value: u16) -> Option<usize>

Tries to put u16 value in native-endian byte order to the beginning of the buffer without advancing the internal cursor. Read more
Source§

fn try_put_u16_ne(&mut self, value: u16) -> Result<usize, TryPutError>

Tries to put u16 value in native-endian byte order to the beginning of the buffer without advancing the internal cursor. Read more
Source§

fn put_u32_le_at(&mut self, value: u32, offset: usize) -> usize

Puts a u32 value in little-endian byte order to the buffer at the specified offset without advancing the internal cursor. Read more
Source§

fn put_u32_le_at_checked(&mut self, value: u32, offset: usize) -> Option<usize>

Tries to put u32 value in little-endian byte order to the buffer at the specified offset without advancing the internal cursor. Read more
Source§

fn try_put_u32_le_at( &mut self, value: u32, offset: usize, ) -> Result<usize, TryPutAtError>

Tries to put u32 value in little-endian byte order to the buffer at the specified offset without advancing the internal cursor. Read more
Source§

fn put_u32_be_at(&mut self, value: u32, offset: usize) -> usize

Puts u32 value in big-endian byte order to the buffer at the specified offset without advancing the internal cursor. Read more
Source§

fn put_u32_be_at_checked(&mut self, value: u32, offset: usize) -> Option<usize>

Tries to put u32 value in big-endian byte order to the buffer at the specified offset without advancing the internal cursor. Read more
Source§

fn try_put_u32_be_at( &mut self, value: u32, offset: usize, ) -> Result<usize, TryPutAtError>

Tries to put u32 value in big-endian byte order to the buffer at the specified offset without advancing the internal cursor. Read more
Source§

fn put_u32_ne_at(&mut self, value: u32, offset: usize) -> usize

Puts u32 value in native-endian byte order to the buffer at the specified offset without advancing the internal cursor. Read more
Source§

fn put_u32_ne_at_checked(&mut self, value: u32, offset: usize) -> Option<usize>

Tries to put u32 value in native-endian byte order to the buffer at the specified offset without advancing the internal cursor. Read more
Source§

fn try_put_u32_ne_at( &mut self, value: u32, offset: usize, ) -> Result<usize, TryPutAtError>

Tries to put u32 value in native-endian byte order to the buffer at the specified offset without advancing the internal cursor. Read more
Source§

fn put_u32_le(&mut self, value: u32) -> usize

Puts u32 value in little-endian byte order to the beginning of the buffer without advancing the internal cursor. Read more
Source§

fn put_u32_le_checked(&mut self, value: u32) -> Option<usize>

Tries to put u32 value in little-endian byte order to the beginning of the buffer without advancing the internal cursor. Read more
Source§

fn try_put_u32_le(&mut self, value: u32) -> Result<usize, TryPutError>

Tries to put u32 value in little-endian byte order to the beginning of the buffer without advancing the internal cursor. Read more
Source§

fn put_u32_be(&mut self, value: u32) -> usize

Puts a u32 value in big-endian byte order to the beginning of the buffer without advancing the internal cursor. Read more
Source§

fn put_u32_be_checked(&mut self, value: u32) -> Option<usize>

Tries to put u32 value in big-endian byte order to the beginning of the buffer without advancing the internal cursor. Read more
Source§

fn try_put_u32_be(&mut self, value: u32) -> Result<usize, TryPutError>

Tries to put u32 value in big-endian byte order to the beginning of the buffer without advancing the internal cursor. Read more
Source§

fn put_u32_ne(&mut self, value: u32) -> usize

Puts u32 value in native-endian byte order to the beginning of the buffer without advancing the internal cursor. Read more
Source§

fn put_u32_ne_checked(&mut self, value: u32) -> Option<usize>

Tries to put u32 value in native-endian byte order to the beginning of the buffer without advancing the internal cursor. Read more
Source§

fn try_put_u32_ne(&mut self, value: u32) -> Result<usize, TryPutError>

Tries to put u32 value in native-endian byte order to the beginning of the buffer without advancing the internal cursor. Read more
Source§

fn put_u64_le_at(&mut self, value: u64, offset: usize) -> usize

Puts a u64 value in little-endian byte order to the buffer at the specified offset without advancing the internal cursor. Read more
Source§

fn put_u64_le_at_checked(&mut self, value: u64, offset: usize) -> Option<usize>

Tries to put u64 value in little-endian byte order to the buffer at the specified offset without advancing the internal cursor. Read more
Source§

fn try_put_u64_le_at( &mut self, value: u64, offset: usize, ) -> Result<usize, TryPutAtError>

Tries to put u64 value in little-endian byte order to the buffer at the specified offset without advancing the internal cursor. Read more
Source§

fn put_u64_be_at(&mut self, value: u64, offset: usize) -> usize

Puts u64 value in big-endian byte order to the buffer at the specified offset without advancing the internal cursor. Read more
Source§

fn put_u64_be_at_checked(&mut self, value: u64, offset: usize) -> Option<usize>

Tries to put u64 value in big-endian byte order to the buffer at the specified offset without advancing the internal cursor. Read more
Source§

fn try_put_u64_be_at( &mut self, value: u64, offset: usize, ) -> Result<usize, TryPutAtError>

Tries to put u64 value in big-endian byte order to the buffer at the specified offset without advancing the internal cursor. Read more
Source§

fn put_u64_ne_at(&mut self, value: u64, offset: usize) -> usize

Puts u64 value in native-endian byte order to the buffer at the specified offset without advancing the internal cursor. Read more
Source§

fn put_u64_ne_at_checked(&mut self, value: u64, offset: usize) -> Option<usize>

Tries to put u64 value in native-endian byte order to the buffer at the specified offset without advancing the internal cursor. Read more
Source§

fn try_put_u64_ne_at( &mut self, value: u64, offset: usize, ) -> Result<usize, TryPutAtError>

Tries to put u64 value in native-endian byte order to the buffer at the specified offset without advancing the internal cursor. Read more
Source§

fn put_u64_le(&mut self, value: u64) -> usize

Puts u64 value in little-endian byte order to the beginning of the buffer without advancing the internal cursor. Read more
Source§

fn put_u64_le_checked(&mut self, value: u64) -> Option<usize>

Tries to put u64 value in little-endian byte order to the beginning of the buffer without advancing the internal cursor. Read more
Source§

fn try_put_u64_le(&mut self, value: u64) -> Result<usize, TryPutError>

Tries to put u64 value in little-endian byte order to the beginning of the buffer without advancing the internal cursor. Read more
Source§

fn put_u64_be(&mut self, value: u64) -> usize

Puts a u64 value in big-endian byte order to the beginning of the buffer without advancing the internal cursor. Read more
Source§

fn put_u64_be_checked(&mut self, value: u64) -> Option<usize>

Tries to put u64 value in big-endian byte order to the beginning of the buffer without advancing the internal cursor. Read more
Source§

fn try_put_u64_be(&mut self, value: u64) -> Result<usize, TryPutError>

Tries to put u64 value in big-endian byte order to the beginning of the buffer without advancing the internal cursor. Read more
Source§

fn put_u64_ne(&mut self, value: u64) -> usize

Puts u64 value in native-endian byte order to the beginning of the buffer without advancing the internal cursor. Read more
Source§

fn put_u64_ne_checked(&mut self, value: u64) -> Option<usize>

Tries to put u64 value in native-endian byte order to the beginning of the buffer without advancing the internal cursor. Read more
Source§

fn try_put_u64_ne(&mut self, value: u64) -> Result<usize, TryPutError>

Tries to put u64 value in native-endian byte order to the beginning of the buffer without advancing the internal cursor. Read more
Source§

fn put_u128_le_at(&mut self, value: u128, offset: usize) -> usize

Puts a u128 value in little-endian byte order to the buffer at the specified offset without advancing the internal cursor. Read more
Source§

fn put_u128_le_at_checked( &mut self, value: u128, offset: usize, ) -> Option<usize>

Tries to put u128 value in little-endian byte order to the buffer at the specified offset without advancing the internal cursor. Read more
Source§

fn try_put_u128_le_at( &mut self, value: u128, offset: usize, ) -> Result<usize, TryPutAtError>

Tries to put u128 value in little-endian byte order to the buffer at the specified offset without advancing the internal cursor. Read more
Source§

fn put_u128_be_at(&mut self, value: u128, offset: usize) -> usize

Puts u128 value in big-endian byte order to the buffer at the specified offset without advancing the internal cursor. Read more
Source§

fn put_u128_be_at_checked( &mut self, value: u128, offset: usize, ) -> Option<usize>

Tries to put u128 value in big-endian byte order to the buffer at the specified offset without advancing the internal cursor. Read more
Source§

fn try_put_u128_be_at( &mut self, value: u128, offset: usize, ) -> Result<usize, TryPutAtError>

Tries to put u128 value in big-endian byte order to the buffer at the specified offset without advancing the internal cursor. Read more
Source§

fn put_u128_ne_at(&mut self, value: u128, offset: usize) -> usize

Puts u128 value in native-endian byte order to the buffer at the specified offset without advancing the internal cursor. Read more
Source§

fn put_u128_ne_at_checked( &mut self, value: u128, offset: usize, ) -> Option<usize>

Tries to put u128 value in native-endian byte order to the buffer at the specified offset without advancing the internal cursor. Read more
Source§

fn try_put_u128_ne_at( &mut self, value: u128, offset: usize, ) -> Result<usize, TryPutAtError>

Tries to put u128 value in native-endian byte order to the buffer at the specified offset without advancing the internal cursor. Read more
Source§

fn put_u128_le(&mut self, value: u128) -> usize

Puts u128 value in little-endian byte order to the beginning of the buffer without advancing the internal cursor. Read more
Source§

fn put_u128_le_checked(&mut self, value: u128) -> Option<usize>

Tries to put u128 value in little-endian byte order to the beginning of the buffer without advancing the internal cursor. Read more
Source§

fn try_put_u128_le(&mut self, value: u128) -> Result<usize, TryPutError>

Tries to put u128 value in little-endian byte order to the beginning of the buffer without advancing the internal cursor. Read more
Source§

fn put_u128_be(&mut self, value: u128) -> usize

Puts a u128 value in big-endian byte order to the beginning of the buffer without advancing the internal cursor. Read more
Source§

fn put_u128_be_checked(&mut self, value: u128) -> Option<usize>

Tries to put u128 value in big-endian byte order to the beginning of the buffer without advancing the internal cursor. Read more
Source§

fn try_put_u128_be(&mut self, value: u128) -> Result<usize, TryPutError>

Tries to put u128 value in big-endian byte order to the beginning of the buffer without advancing the internal cursor. Read more
Source§

fn put_u128_ne(&mut self, value: u128) -> usize

Puts u128 value in native-endian byte order to the beginning of the buffer without advancing the internal cursor. Read more
Source§

fn put_u128_ne_checked(&mut self, value: u128) -> Option<usize>

Tries to put u128 value in native-endian byte order to the beginning of the buffer without advancing the internal cursor. Read more
Source§

fn try_put_u128_ne(&mut self, value: u128) -> Result<usize, TryPutError>

Tries to put u128 value in native-endian byte order to the beginning of the buffer without advancing the internal cursor. Read more
Source§

fn put_i16_le_at(&mut self, value: i16, offset: usize) -> usize

Puts a i16 value in little-endian byte order to the buffer at the specified offset without advancing the internal cursor. Read more
Source§

fn put_i16_le_at_checked(&mut self, value: i16, offset: usize) -> Option<usize>

Tries to put i16 value in little-endian byte order to the buffer at the specified offset without advancing the internal cursor. Read more
Source§

fn try_put_i16_le_at( &mut self, value: i16, offset: usize, ) -> Result<usize, TryPutAtError>

Tries to put i16 value in little-endian byte order to the buffer at the specified offset without advancing the internal cursor. Read more
Source§

fn put_i16_be_at(&mut self, value: i16, offset: usize) -> usize

Puts i16 value in big-endian byte order to the buffer at the specified offset without advancing the internal cursor. Read more
Source§

fn put_i16_be_at_checked(&mut self, value: i16, offset: usize) -> Option<usize>

Tries to put i16 value in big-endian byte order to the buffer at the specified offset without advancing the internal cursor. Read more
Source§

fn try_put_i16_be_at( &mut self, value: i16, offset: usize, ) -> Result<usize, TryPutAtError>

Tries to put i16 value in big-endian byte order to the buffer at the specified offset without advancing the internal cursor. Read more
Source§

fn put_i16_ne_at(&mut self, value: i16, offset: usize) -> usize

Puts i16 value in native-endian byte order to the buffer at the specified offset without advancing the internal cursor. Read more
Source§

fn put_i16_ne_at_checked(&mut self, value: i16, offset: usize) -> Option<usize>

Tries to put i16 value in native-endian byte order to the buffer at the specified offset without advancing the internal cursor. Read more
Source§

fn try_put_i16_ne_at( &mut self, value: i16, offset: usize, ) -> Result<usize, TryPutAtError>

Tries to put i16 value in native-endian byte order to the buffer at the specified offset without advancing the internal cursor. Read more
Source§

fn put_i16_le(&mut self, value: i16) -> usize

Puts i16 value in little-endian byte order to the beginning of the buffer without advancing the internal cursor. Read more
Source§

fn put_i16_le_checked(&mut self, value: i16) -> Option<usize>

Tries to put i16 value in little-endian byte order to the beginning of the buffer without advancing the internal cursor. Read more
Source§

fn try_put_i16_le(&mut self, value: i16) -> Result<usize, TryPutError>

Tries to put i16 value in little-endian byte order to the beginning of the buffer without advancing the internal cursor. Read more
Source§

fn put_i16_be(&mut self, value: i16) -> usize

Puts a i16 value in big-endian byte order to the beginning of the buffer without advancing the internal cursor. Read more
Source§

fn put_i16_be_checked(&mut self, value: i16) -> Option<usize>

Tries to put i16 value in big-endian byte order to the beginning of the buffer without advancing the internal cursor. Read more
Source§

fn try_put_i16_be(&mut self, value: i16) -> Result<usize, TryPutError>

Tries to put i16 value in big-endian byte order to the beginning of the buffer without advancing the internal cursor. Read more
Source§

fn put_i16_ne(&mut self, value: i16) -> usize

Puts i16 value in native-endian byte order to the beginning of the buffer without advancing the internal cursor. Read more
Source§

fn put_i16_ne_checked(&mut self, value: i16) -> Option<usize>

Tries to put i16 value in native-endian byte order to the beginning of the buffer without advancing the internal cursor. Read more
Source§

fn try_put_i16_ne(&mut self, value: i16) -> Result<usize, TryPutError>

Tries to put i16 value in native-endian byte order to the beginning of the buffer without advancing the internal cursor. Read more
Source§

fn put_i32_le_at(&mut self, value: i32, offset: usize) -> usize

Puts a i32 value in little-endian byte order to the buffer at the specified offset without advancing the internal cursor. Read more
Source§

fn put_i32_le_at_checked(&mut self, value: i32, offset: usize) -> Option<usize>

Tries to put i32 value in little-endian byte order to the buffer at the specified offset without advancing the internal cursor. Read more
Source§

fn try_put_i32_le_at( &mut self, value: i32, offset: usize, ) -> Result<usize, TryPutAtError>

Tries to put i32 value in little-endian byte order to the buffer at the specified offset without advancing the internal cursor. Read more
Source§

fn put_i32_be_at(&mut self, value: i32, offset: usize) -> usize

Puts i32 value in big-endian byte order to the buffer at the specified offset without advancing the internal cursor. Read more
Source§

fn put_i32_be_at_checked(&mut self, value: i32, offset: usize) -> Option<usize>

Tries to put i32 value in big-endian byte order to the buffer at the specified offset without advancing the internal cursor. Read more
Source§

fn try_put_i32_be_at( &mut self, value: i32, offset: usize, ) -> Result<usize, TryPutAtError>

Tries to put i32 value in big-endian byte order to the buffer at the specified offset without advancing the internal cursor. Read more
Source§

fn put_i32_ne_at(&mut self, value: i32, offset: usize) -> usize

Puts i32 value in native-endian byte order to the buffer at the specified offset without advancing the internal cursor. Read more
Source§

fn put_i32_ne_at_checked(&mut self, value: i32, offset: usize) -> Option<usize>

Tries to put i32 value in native-endian byte order to the buffer at the specified offset without advancing the internal cursor. Read more
Source§

fn try_put_i32_ne_at( &mut self, value: i32, offset: usize, ) -> Result<usize, TryPutAtError>

Tries to put i32 value in native-endian byte order to the buffer at the specified offset without advancing the internal cursor. Read more
Source§

fn put_i32_le(&mut self, value: i32) -> usize

Puts i32 value in little-endian byte order to the beginning of the buffer without advancing the internal cursor. Read more
Source§

fn put_i32_le_checked(&mut self, value: i32) -> Option<usize>

Tries to put i32 value in little-endian byte order to the beginning of the buffer without advancing the internal cursor. Read more
Source§

fn try_put_i32_le(&mut self, value: i32) -> Result<usize, TryPutError>

Tries to put i32 value in little-endian byte order to the beginning of the buffer without advancing the internal cursor. Read more
Source§

fn put_i32_be(&mut self, value: i32) -> usize

Puts a i32 value in big-endian byte order to the beginning of the buffer without advancing the internal cursor. Read more
Source§

fn put_i32_be_checked(&mut self, value: i32) -> Option<usize>

Tries to put i32 value in big-endian byte order to the beginning of the buffer without advancing the internal cursor. Read more
Source§

fn try_put_i32_be(&mut self, value: i32) -> Result<usize, TryPutError>

Tries to put i32 value in big-endian byte order to the beginning of the buffer without advancing the internal cursor. Read more
Source§

fn put_i32_ne(&mut self, value: i32) -> usize

Puts i32 value in native-endian byte order to the beginning of the buffer without advancing the internal cursor. Read more
Source§

fn put_i32_ne_checked(&mut self, value: i32) -> Option<usize>

Tries to put i32 value in native-endian byte order to the beginning of the buffer without advancing the internal cursor. Read more
Source§

fn try_put_i32_ne(&mut self, value: i32) -> Result<usize, TryPutError>

Tries to put i32 value in native-endian byte order to the beginning of the buffer without advancing the internal cursor. Read more
Source§

fn put_i64_le_at(&mut self, value: i64, offset: usize) -> usize

Puts a i64 value in little-endian byte order to the buffer at the specified offset without advancing the internal cursor. Read more
Source§

fn put_i64_le_at_checked(&mut self, value: i64, offset: usize) -> Option<usize>

Tries to put i64 value in little-endian byte order to the buffer at the specified offset without advancing the internal cursor. Read more
Source§

fn try_put_i64_le_at( &mut self, value: i64, offset: usize, ) -> Result<usize, TryPutAtError>

Tries to put i64 value in little-endian byte order to the buffer at the specified offset without advancing the internal cursor. Read more
Source§

fn put_i64_be_at(&mut self, value: i64, offset: usize) -> usize

Puts i64 value in big-endian byte order to the buffer at the specified offset without advancing the internal cursor. Read more
Source§

fn put_i64_be_at_checked(&mut self, value: i64, offset: usize) -> Option<usize>

Tries to put i64 value in big-endian byte order to the buffer at the specified offset without advancing the internal cursor. Read more
Source§

fn try_put_i64_be_at( &mut self, value: i64, offset: usize, ) -> Result<usize, TryPutAtError>

Tries to put i64 value in big-endian byte order to the buffer at the specified offset without advancing the internal cursor. Read more
Source§

fn put_i64_ne_at(&mut self, value: i64, offset: usize) -> usize

Puts i64 value in native-endian byte order to the buffer at the specified offset without advancing the internal cursor. Read more
Source§

fn put_i64_ne_at_checked(&mut self, value: i64, offset: usize) -> Option<usize>

Tries to put i64 value in native-endian byte order to the buffer at the specified offset without advancing the internal cursor. Read more
Source§

fn try_put_i64_ne_at( &mut self, value: i64, offset: usize, ) -> Result<usize, TryPutAtError>

Tries to put i64 value in native-endian byte order to the buffer at the specified offset without advancing the internal cursor. Read more
Source§

fn put_i64_le(&mut self, value: i64) -> usize

Puts i64 value in little-endian byte order to the beginning of the buffer without advancing the internal cursor. Read more
Source§

fn put_i64_le_checked(&mut self, value: i64) -> Option<usize>

Tries to put i64 value in little-endian byte order to the beginning of the buffer without advancing the internal cursor. Read more
Source§

fn try_put_i64_le(&mut self, value: i64) -> Result<usize, TryPutError>

Tries to put i64 value in little-endian byte order to the beginning of the buffer without advancing the internal cursor. Read more
Source§

fn put_i64_be(&mut self, value: i64) -> usize

Puts a i64 value in big-endian byte order to the beginning of the buffer without advancing the internal cursor. Read more
Source§

fn put_i64_be_checked(&mut self, value: i64) -> Option<usize>

Tries to put i64 value in big-endian byte order to the beginning of the buffer without advancing the internal cursor. Read more
Source§

fn try_put_i64_be(&mut self, value: i64) -> Result<usize, TryPutError>

Tries to put i64 value in big-endian byte order to the beginning of the buffer without advancing the internal cursor. Read more
Source§

fn put_i64_ne(&mut self, value: i64) -> usize

Puts i64 value in native-endian byte order to the beginning of the buffer without advancing the internal cursor. Read more
Source§

fn put_i64_ne_checked(&mut self, value: i64) -> Option<usize>

Tries to put i64 value in native-endian byte order to the beginning of the buffer without advancing the internal cursor. Read more
Source§

fn try_put_i64_ne(&mut self, value: i64) -> Result<usize, TryPutError>

Tries to put i64 value in native-endian byte order to the beginning of the buffer without advancing the internal cursor. Read more
Source§

fn put_i128_le_at(&mut self, value: i128, offset: usize) -> usize

Puts a i128 value in little-endian byte order to the buffer at the specified offset without advancing the internal cursor. Read more
Source§

fn put_i128_le_at_checked( &mut self, value: i128, offset: usize, ) -> Option<usize>

Tries to put i128 value in little-endian byte order to the buffer at the specified offset without advancing the internal cursor. Read more
Source§

fn try_put_i128_le_at( &mut self, value: i128, offset: usize, ) -> Result<usize, TryPutAtError>

Tries to put i128 value in little-endian byte order to the buffer at the specified offset without advancing the internal cursor. Read more
Source§

fn put_i128_be_at(&mut self, value: i128, offset: usize) -> usize

Puts i128 value in big-endian byte order to the buffer at the specified offset without advancing the internal cursor. Read more
Source§

fn put_i128_be_at_checked( &mut self, value: i128, offset: usize, ) -> Option<usize>

Tries to put i128 value in big-endian byte order to the buffer at the specified offset without advancing the internal cursor. Read more
Source§

fn try_put_i128_be_at( &mut self, value: i128, offset: usize, ) -> Result<usize, TryPutAtError>

Tries to put i128 value in big-endian byte order to the buffer at the specified offset without advancing the internal cursor. Read more
Source§

fn put_i128_ne_at(&mut self, value: i128, offset: usize) -> usize

Puts i128 value in native-endian byte order to the buffer at the specified offset without advancing the internal cursor. Read more
Source§

fn put_i128_ne_at_checked( &mut self, value: i128, offset: usize, ) -> Option<usize>

Tries to put i128 value in native-endian byte order to the buffer at the specified offset without advancing the internal cursor. Read more
Source§

fn try_put_i128_ne_at( &mut self, value: i128, offset: usize, ) -> Result<usize, TryPutAtError>

Tries to put i128 value in native-endian byte order to the buffer at the specified offset without advancing the internal cursor. Read more
Source§

fn put_i128_le(&mut self, value: i128) -> usize

Puts i128 value in little-endian byte order to the beginning of the buffer without advancing the internal cursor. Read more
Source§

fn put_i128_le_checked(&mut self, value: i128) -> Option<usize>

Tries to put i128 value in little-endian byte order to the beginning of the buffer without advancing the internal cursor. Read more
Source§

fn try_put_i128_le(&mut self, value: i128) -> Result<usize, TryPutError>

Tries to put i128 value in little-endian byte order to the beginning of the buffer without advancing the internal cursor. Read more
Source§

fn put_i128_be(&mut self, value: i128) -> usize

Puts a i128 value in big-endian byte order to the beginning of the buffer without advancing the internal cursor. Read more
Source§

fn put_i128_be_checked(&mut self, value: i128) -> Option<usize>

Tries to put i128 value in big-endian byte order to the beginning of the buffer without advancing the internal cursor. Read more
Source§

fn try_put_i128_be(&mut self, value: i128) -> Result<usize, TryPutError>

Tries to put i128 value in big-endian byte order to the beginning of the buffer without advancing the internal cursor. Read more
Source§

fn put_i128_ne(&mut self, value: i128) -> usize

Puts i128 value in native-endian byte order to the beginning of the buffer without advancing the internal cursor. Read more
Source§

fn put_i128_ne_checked(&mut self, value: i128) -> Option<usize>

Tries to put i128 value in native-endian byte order to the beginning of the buffer without advancing the internal cursor. Read more
Source§

fn try_put_i128_ne(&mut self, value: i128) -> Result<usize, TryPutError>

Tries to put i128 value in native-endian byte order to the beginning of the buffer without advancing the internal cursor. Read more
Source§

fn put_f32_le_at(&mut self, value: f32, offset: usize) -> usize

Puts a f32 value in little-endian byte order to the buffer at the specified offset without advancing the internal cursor. Read more
Source§

fn put_f32_le_at_checked(&mut self, value: f32, offset: usize) -> Option<usize>

Tries to put f32 value in little-endian byte order to the buffer at the specified offset without advancing the internal cursor. Read more
Source§

fn try_put_f32_le_at( &mut self, value: f32, offset: usize, ) -> Result<usize, TryPutAtError>

Tries to put f32 value in little-endian byte order to the buffer at the specified offset without advancing the internal cursor. Read more
Source§

fn put_f32_be_at(&mut self, value: f32, offset: usize) -> usize

Puts f32 value in big-endian byte order to the buffer at the specified offset without advancing the internal cursor. Read more
Source§

fn put_f32_be_at_checked(&mut self, value: f32, offset: usize) -> Option<usize>

Tries to put f32 value in big-endian byte order to the buffer at the specified offset without advancing the internal cursor. Read more
Source§

fn try_put_f32_be_at( &mut self, value: f32, offset: usize, ) -> Result<usize, TryPutAtError>

Tries to put f32 value in big-endian byte order to the buffer at the specified offset without advancing the internal cursor. Read more
Source§

fn put_f32_ne_at(&mut self, value: f32, offset: usize) -> usize

Puts f32 value in native-endian byte order to the buffer at the specified offset without advancing the internal cursor. Read more
Source§

fn put_f32_ne_at_checked(&mut self, value: f32, offset: usize) -> Option<usize>

Tries to put f32 value in native-endian byte order to the buffer at the specified offset without advancing the internal cursor. Read more
Source§

fn try_put_f32_ne_at( &mut self, value: f32, offset: usize, ) -> Result<usize, TryPutAtError>

Tries to put f32 value in native-endian byte order to the buffer at the specified offset without advancing the internal cursor. Read more
Source§

fn put_f32_le(&mut self, value: f32) -> usize

Puts f32 value in little-endian byte order to the beginning of the buffer without advancing the internal cursor. Read more
Source§

fn put_f32_le_checked(&mut self, value: f32) -> Option<usize>

Tries to put f32 value in little-endian byte order to the beginning of the buffer without advancing the internal cursor. Read more
Source§

fn try_put_f32_le(&mut self, value: f32) -> Result<usize, TryPutError>

Tries to put f32 value in little-endian byte order to the beginning of the buffer without advancing the internal cursor. Read more
Source§

fn put_f32_be(&mut self, value: f32) -> usize

Puts a f32 value in big-endian byte order to the beginning of the buffer without advancing the internal cursor. Read more
Source§

fn put_f32_be_checked(&mut self, value: f32) -> Option<usize>

Tries to put f32 value in big-endian byte order to the beginning of the buffer without advancing the internal cursor. Read more
Source§

fn try_put_f32_be(&mut self, value: f32) -> Result<usize, TryPutError>

Tries to put f32 value in big-endian byte order to the beginning of the buffer without advancing the internal cursor. Read more
Source§

fn put_f32_ne(&mut self, value: f32) -> usize

Puts f32 value in native-endian byte order to the beginning of the buffer without advancing the internal cursor. Read more
Source§

fn put_f32_ne_checked(&mut self, value: f32) -> Option<usize>

Tries to put f32 value in native-endian byte order to the beginning of the buffer without advancing the internal cursor. Read more
Source§

fn try_put_f32_ne(&mut self, value: f32) -> Result<usize, TryPutError>

Tries to put f32 value in native-endian byte order to the beginning of the buffer without advancing the internal cursor. Read more
Source§

fn put_f64_le_at(&mut self, value: f64, offset: usize) -> usize

Puts a f64 value in little-endian byte order to the buffer at the specified offset without advancing the internal cursor. Read more
Source§

fn put_f64_le_at_checked(&mut self, value: f64, offset: usize) -> Option<usize>

Tries to put f64 value in little-endian byte order to the buffer at the specified offset without advancing the internal cursor. Read more
Source§

fn try_put_f64_le_at( &mut self, value: f64, offset: usize, ) -> Result<usize, TryPutAtError>

Tries to put f64 value in little-endian byte order to the buffer at the specified offset without advancing the internal cursor. Read more
Source§

fn put_f64_be_at(&mut self, value: f64, offset: usize) -> usize

Puts f64 value in big-endian byte order to the buffer at the specified offset without advancing the internal cursor. Read more
Source§

fn put_f64_be_at_checked(&mut self, value: f64, offset: usize) -> Option<usize>

Tries to put f64 value in big-endian byte order to the buffer at the specified offset without advancing the internal cursor. Read more
Source§

fn try_put_f64_be_at( &mut self, value: f64, offset: usize, ) -> Result<usize, TryPutAtError>

Tries to put f64 value in big-endian byte order to the buffer at the specified offset without advancing the internal cursor. Read more
Source§

fn put_f64_ne_at(&mut self, value: f64, offset: usize) -> usize

Puts f64 value in native-endian byte order to the buffer at the specified offset without advancing the internal cursor. Read more
Source§

fn put_f64_ne_at_checked(&mut self, value: f64, offset: usize) -> Option<usize>

Tries to put f64 value in native-endian byte order to the buffer at the specified offset without advancing the internal cursor. Read more
Source§

fn try_put_f64_ne_at( &mut self, value: f64, offset: usize, ) -> Result<usize, TryPutAtError>

Tries to put f64 value in native-endian byte order to the buffer at the specified offset without advancing the internal cursor. Read more
Source§

fn put_f64_le(&mut self, value: f64) -> usize

Puts f64 value in little-endian byte order to the beginning of the buffer without advancing the internal cursor. Read more
Source§

fn put_f64_le_checked(&mut self, value: f64) -> Option<usize>

Tries to put f64 value in little-endian byte order to the beginning of the buffer without advancing the internal cursor. Read more
Source§

fn try_put_f64_le(&mut self, value: f64) -> Result<usize, TryPutError>

Tries to put f64 value in little-endian byte order to the beginning of the buffer without advancing the internal cursor. Read more
Source§

fn put_f64_be(&mut self, value: f64) -> usize

Puts a f64 value in big-endian byte order to the beginning of the buffer without advancing the internal cursor. Read more
Source§

fn put_f64_be_checked(&mut self, value: f64) -> Option<usize>

Tries to put f64 value in big-endian byte order to the beginning of the buffer without advancing the internal cursor. Read more
Source§

fn try_put_f64_be(&mut self, value: f64) -> Result<usize, TryPutError>

Tries to put f64 value in big-endian byte order to the beginning of the buffer without advancing the internal cursor. Read more
Source§

fn put_f64_ne(&mut self, value: f64) -> usize

Puts f64 value in native-endian byte order to the beginning of the buffer without advancing the internal cursor. Read more
Source§

fn put_f64_ne_checked(&mut self, value: f64) -> Option<usize>

Tries to put f64 value in native-endian byte order to the beginning of the buffer without advancing the internal cursor. Read more
Source§

fn try_put_f64_ne(&mut self, value: f64) -> Result<usize, TryPutError>

Tries to put f64 value in native-endian byte order to the beginning of the buffer without advancing the internal cursor. Read more
Source§

fn write_slice(&mut self, slice: &[u8]) -> usize

Writes slice of bytes to the beginning of the buffer and advances the internal cursor. Read more
Source§

fn write_slice_checked(&mut self, slice: &[u8]) -> Option<usize>

Tries to write slice of bytes to the beginning of the buffer and advance the internal cursor. Read more
Source§

fn try_write_slice(&mut self, slice: &[u8]) -> Result<usize, TryWriteError>

Tries to write slice of bytes to the beginning of the buffer and advance the internal cursor. Read more
Source§

fn write_u8(&mut self, value: u8) -> usize

Writes u8 value to the beginning of the buffer without advancing the internal cursor. Read more
Source§

fn write_u8_checked(&mut self, value: u8) -> Option<usize>

Tries to write u8 value to the beginning of the buffer without advancing the internal cursor. Read more
Source§

fn try_write_u8(&mut self, value: u8) -> Result<usize, TryWriteError>

Tries to write u8 value to the beginning of the buffer without advancing the internal cursor. Read more
Source§

fn write_i8(&mut self, value: i8) -> usize

Writes i8 value to the beginning of the buffer without advancing the internal cursor. Read more
Source§

fn write_i8_checked(&mut self, value: i8) -> Option<usize>

Tries to write i8 value to the beginning of the buffer without advancing the internal cursor. Read more
Source§

fn try_write_i8(&mut self, value: i8) -> Result<usize, TryWriteError>

Tries to write i8 value to the beginning of the buffer without advancing the internal cursor. Read more
Source§

fn write_u16_le(&mut self, value: u16) -> usize

Writes u16 value in little-endian byte order to the beginning of the buffer, advancing the internal cursor. Read more
Source§

fn write_u16_le_checked(&mut self, value: u16) -> Option<usize>

Tries to write u16 value in little-endian byte order to the beginning of the buffer, advancing the internal cursor. Read more
Source§

fn try_write_u16_le(&mut self, value: u16) -> Result<usize, TryWriteError>

Tries to write u16 value in little-endian byte order to the beginning of the buffer, advancing the internal cursor. Read more
Source§

fn write_u16_be(&mut self, value: u16) -> usize

Writes u16 value in big-endian byte order to the beginning of the buffer, advancing the internal cursor. Read more
Source§

fn write_u16_be_checked(&mut self, value: u16) -> Option<usize>

Tries to write u16 value in big-endian byte order to the beginning of the buffer, advancing the internal cursor. Read more
Source§

fn try_write_u16_be(&mut self, value: u16) -> Result<usize, TryWriteError>

Tries to write u16 value in big-endian byte order to the beginning of the buffer, advancing the internal cursor. Read more
Source§

fn write_u16_ne(&mut self, value: u16) -> usize

Writes u16 value in native-endian byte order to the beginning of the buffer, advancing the internal cursor. Read more
Source§

fn write_u16_ne_checked(&mut self, value: u16) -> Option<usize>

Tries to write u16 value in native-endian byte order to the beginning of the buffer, advancing the internal cursor. Read more
Source§

fn try_write_u16_ne(&mut self, value: u16) -> Result<usize, TryWriteError>

Tries to write u16 value in native-endian byte order to the beginning of the buffer, advancing the internal cursor. Read more
Source§

fn write_u32_le(&mut self, value: u32) -> usize

Writes u32 value in little-endian byte order to the beginning of the buffer, advancing the internal cursor. Read more
Source§

fn write_u32_le_checked(&mut self, value: u32) -> Option<usize>

Tries to write u32 value in little-endian byte order to the beginning of the buffer, advancing the internal cursor. Read more
Source§

fn try_write_u32_le(&mut self, value: u32) -> Result<usize, TryWriteError>

Tries to write u32 value in little-endian byte order to the beginning of the buffer, advancing the internal cursor. Read more
Source§

fn write_u32_be(&mut self, value: u32) -> usize

Writes u32 value in big-endian byte order to the beginning of the buffer, advancing the internal cursor. Read more
Source§

fn write_u32_be_checked(&mut self, value: u32) -> Option<usize>

Tries to write u32 value in big-endian byte order to the beginning of the buffer, advancing the internal cursor. Read more
Source§

fn try_write_u32_be(&mut self, value: u32) -> Result<usize, TryWriteError>

Tries to write u32 value in big-endian byte order to the beginning of the buffer, advancing the internal cursor. Read more
Source§

fn write_u32_ne(&mut self, value: u32) -> usize

Writes u32 value in native-endian byte order to the beginning of the buffer, advancing the internal cursor. Read more
Source§

fn write_u32_ne_checked(&mut self, value: u32) -> Option<usize>

Tries to write u32 value in native-endian byte order to the beginning of the buffer, advancing the internal cursor. Read more
Source§

fn try_write_u32_ne(&mut self, value: u32) -> Result<usize, TryWriteError>

Tries to write u32 value in native-endian byte order to the beginning of the buffer, advancing the internal cursor. Read more
Source§

fn write_u64_le(&mut self, value: u64) -> usize

Writes u64 value in little-endian byte order to the beginning of the buffer, advancing the internal cursor. Read more
Source§

fn write_u64_le_checked(&mut self, value: u64) -> Option<usize>

Tries to write u64 value in little-endian byte order to the beginning of the buffer, advancing the internal cursor. Read more
Source§

fn try_write_u64_le(&mut self, value: u64) -> Result<usize, TryWriteError>

Tries to write u64 value in little-endian byte order to the beginning of the buffer, advancing the internal cursor. Read more
Source§

fn write_u64_be(&mut self, value: u64) -> usize

Writes u64 value in big-endian byte order to the beginning of the buffer, advancing the internal cursor. Read more
Source§

fn write_u64_be_checked(&mut self, value: u64) -> Option<usize>

Tries to write u64 value in big-endian byte order to the beginning of the buffer, advancing the internal cursor. Read more
Source§

fn try_write_u64_be(&mut self, value: u64) -> Result<usize, TryWriteError>

Tries to write u64 value in big-endian byte order to the beginning of the buffer, advancing the internal cursor. Read more
Source§

fn write_u64_ne(&mut self, value: u64) -> usize

Writes u64 value in native-endian byte order to the beginning of the buffer, advancing the internal cursor. Read more
Source§

fn write_u64_ne_checked(&mut self, value: u64) -> Option<usize>

Tries to write u64 value in native-endian byte order to the beginning of the buffer, advancing the internal cursor. Read more
Source§

fn try_write_u64_ne(&mut self, value: u64) -> Result<usize, TryWriteError>

Tries to write u64 value in native-endian byte order to the beginning of the buffer, advancing the internal cursor. Read more
Source§

fn write_u128_le(&mut self, value: u128) -> usize

Writes u128 value in little-endian byte order to the beginning of the buffer, advancing the internal cursor. Read more
Source§

fn write_u128_le_checked(&mut self, value: u128) -> Option<usize>

Tries to write u128 value in little-endian byte order to the beginning of the buffer, advancing the internal cursor. Read more
Source§

fn try_write_u128_le(&mut self, value: u128) -> Result<usize, TryWriteError>

Tries to write u128 value in little-endian byte order to the beginning of the buffer, advancing the internal cursor. Read more
Source§

fn write_u128_be(&mut self, value: u128) -> usize

Writes u128 value in big-endian byte order to the beginning of the buffer, advancing the internal cursor. Read more
Source§

fn write_u128_be_checked(&mut self, value: u128) -> Option<usize>

Tries to write u128 value in big-endian byte order to the beginning of the buffer, advancing the internal cursor. Read more
Source§

fn try_write_u128_be(&mut self, value: u128) -> Result<usize, TryWriteError>

Tries to write u128 value in big-endian byte order to the beginning of the buffer, advancing the internal cursor. Read more
Source§

fn write_u128_ne(&mut self, value: u128) -> usize

Writes u128 value in native-endian byte order to the beginning of the buffer, advancing the internal cursor. Read more
Source§

fn write_u128_ne_checked(&mut self, value: u128) -> Option<usize>

Tries to write u128 value in native-endian byte order to the beginning of the buffer, advancing the internal cursor. Read more
Source§

fn try_write_u128_ne(&mut self, value: u128) -> Result<usize, TryWriteError>

Tries to write u128 value in native-endian byte order to the beginning of the buffer, advancing the internal cursor. Read more
Source§

fn write_i16_le(&mut self, value: i16) -> usize

Writes i16 value in little-endian byte order to the beginning of the buffer, advancing the internal cursor. Read more
Source§

fn write_i16_le_checked(&mut self, value: i16) -> Option<usize>

Tries to write i16 value in little-endian byte order to the beginning of the buffer, advancing the internal cursor. Read more
Source§

fn try_write_i16_le(&mut self, value: i16) -> Result<usize, TryWriteError>

Tries to write i16 value in little-endian byte order to the beginning of the buffer, advancing the internal cursor. Read more
Source§

fn write_i16_be(&mut self, value: i16) -> usize

Writes i16 value in big-endian byte order to the beginning of the buffer, advancing the internal cursor. Read more
Source§

fn write_i16_be_checked(&mut self, value: i16) -> Option<usize>

Tries to write i16 value in big-endian byte order to the beginning of the buffer, advancing the internal cursor. Read more
Source§

fn try_write_i16_be(&mut self, value: i16) -> Result<usize, TryWriteError>

Tries to write i16 value in big-endian byte order to the beginning of the buffer, advancing the internal cursor. Read more
Source§

fn write_i16_ne(&mut self, value: i16) -> usize

Writes i16 value in native-endian byte order to the beginning of the buffer, advancing the internal cursor. Read more
Source§

fn write_i16_ne_checked(&mut self, value: i16) -> Option<usize>

Tries to write i16 value in native-endian byte order to the beginning of the buffer, advancing the internal cursor. Read more
Source§

fn try_write_i16_ne(&mut self, value: i16) -> Result<usize, TryWriteError>

Tries to write i16 value in native-endian byte order to the beginning of the buffer, advancing the internal cursor. Read more
Source§

fn write_i32_le(&mut self, value: i32) -> usize

Writes i32 value in little-endian byte order to the beginning of the buffer, advancing the internal cursor. Read more
Source§

fn write_i32_le_checked(&mut self, value: i32) -> Option<usize>

Tries to write i32 value in little-endian byte order to the beginning of the buffer, advancing the internal cursor. Read more
Source§

fn try_write_i32_le(&mut self, value: i32) -> Result<usize, TryWriteError>

Tries to write i32 value in little-endian byte order to the beginning of the buffer, advancing the internal cursor. Read more
Source§

fn write_i32_be(&mut self, value: i32) -> usize

Writes i32 value in big-endian byte order to the beginning of the buffer, advancing the internal cursor. Read more
Source§

fn write_i32_be_checked(&mut self, value: i32) -> Option<usize>

Tries to write i32 value in big-endian byte order to the beginning of the buffer, advancing the internal cursor. Read more
Source§

fn try_write_i32_be(&mut self, value: i32) -> Result<usize, TryWriteError>

Tries to write i32 value in big-endian byte order to the beginning of the buffer, advancing the internal cursor. Read more
Source§

fn write_i32_ne(&mut self, value: i32) -> usize

Writes i32 value in native-endian byte order to the beginning of the buffer, advancing the internal cursor. Read more
Source§

fn write_i32_ne_checked(&mut self, value: i32) -> Option<usize>

Tries to write i32 value in native-endian byte order to the beginning of the buffer, advancing the internal cursor. Read more
Source§

fn try_write_i32_ne(&mut self, value: i32) -> Result<usize, TryWriteError>

Tries to write i32 value in native-endian byte order to the beginning of the buffer, advancing the internal cursor. Read more
Source§

fn write_i64_le(&mut self, value: i64) -> usize

Writes i64 value in little-endian byte order to the beginning of the buffer, advancing the internal cursor. Read more
Source§

fn write_i64_le_checked(&mut self, value: i64) -> Option<usize>

Tries to write i64 value in little-endian byte order to the beginning of the buffer, advancing the internal cursor. Read more
Source§

fn try_write_i64_le(&mut self, value: i64) -> Result<usize, TryWriteError>

Tries to write i64 value in little-endian byte order to the beginning of the buffer, advancing the internal cursor. Read more
Source§

fn write_i64_be(&mut self, value: i64) -> usize

Writes i64 value in big-endian byte order to the beginning of the buffer, advancing the internal cursor. Read more
Source§

fn write_i64_be_checked(&mut self, value: i64) -> Option<usize>

Tries to write i64 value in big-endian byte order to the beginning of the buffer, advancing the internal cursor. Read more
Source§

fn try_write_i64_be(&mut self, value: i64) -> Result<usize, TryWriteError>

Tries to write i64 value in big-endian byte order to the beginning of the buffer, advancing the internal cursor. Read more
Source§

fn write_i64_ne(&mut self, value: i64) -> usize

Writes i64 value in native-endian byte order to the beginning of the buffer, advancing the internal cursor. Read more
Source§

fn write_i64_ne_checked(&mut self, value: i64) -> Option<usize>

Tries to write i64 value in native-endian byte order to the beginning of the buffer, advancing the internal cursor. Read more
Source§

fn try_write_i64_ne(&mut self, value: i64) -> Result<usize, TryWriteError>

Tries to write i64 value in native-endian byte order to the beginning of the buffer, advancing the internal cursor. Read more
Source§

fn write_i128_le(&mut self, value: i128) -> usize

Writes i128 value in little-endian byte order to the beginning of the buffer, advancing the internal cursor. Read more
Source§

fn write_i128_le_checked(&mut self, value: i128) -> Option<usize>

Tries to write i128 value in little-endian byte order to the beginning of the buffer, advancing the internal cursor. Read more
Source§

fn try_write_i128_le(&mut self, value: i128) -> Result<usize, TryWriteError>

Tries to write i128 value in little-endian byte order to the beginning of the buffer, advancing the internal cursor. Read more
Source§

fn write_i128_be(&mut self, value: i128) -> usize

Writes i128 value in big-endian byte order to the beginning of the buffer, advancing the internal cursor. Read more
Source§

fn write_i128_be_checked(&mut self, value: i128) -> Option<usize>

Tries to write i128 value in big-endian byte order to the beginning of the buffer, advancing the internal cursor. Read more
Source§

fn try_write_i128_be(&mut self, value: i128) -> Result<usize, TryWriteError>

Tries to write i128 value in big-endian byte order to the beginning of the buffer, advancing the internal cursor. Read more
Source§

fn write_i128_ne(&mut self, value: i128) -> usize

Writes i128 value in native-endian byte order to the beginning of the buffer, advancing the internal cursor. Read more
Source§

fn write_i128_ne_checked(&mut self, value: i128) -> Option<usize>

Tries to write i128 value in native-endian byte order to the beginning of the buffer, advancing the internal cursor. Read more
Source§

fn try_write_i128_ne(&mut self, value: i128) -> Result<usize, TryWriteError>

Tries to write i128 value in native-endian byte order to the beginning of the buffer, advancing the internal cursor. Read more
Source§

fn write_f32_le(&mut self, value: f32) -> usize

Writes f32 value in little-endian byte order to the beginning of the buffer, advancing the internal cursor. Read more
Source§

fn write_f32_le_checked(&mut self, value: f32) -> Option<usize>

Tries to write f32 value in little-endian byte order to the beginning of the buffer, advancing the internal cursor. Read more
Source§

fn try_write_f32_le(&mut self, value: f32) -> Result<usize, TryWriteError>

Tries to write f32 value in little-endian byte order to the beginning of the buffer, advancing the internal cursor. Read more
Source§

fn write_f32_be(&mut self, value: f32) -> usize

Writes f32 value in big-endian byte order to the beginning of the buffer, advancing the internal cursor. Read more
Source§

fn write_f32_be_checked(&mut self, value: f32) -> Option<usize>

Tries to write f32 value in big-endian byte order to the beginning of the buffer, advancing the internal cursor. Read more
Source§

fn try_write_f32_be(&mut self, value: f32) -> Result<usize, TryWriteError>

Tries to write f32 value in big-endian byte order to the beginning of the buffer, advancing the internal cursor. Read more
Source§

fn write_f32_ne(&mut self, value: f32) -> usize

Writes f32 value in native-endian byte order to the beginning of the buffer, advancing the internal cursor. Read more
Source§

fn write_f32_ne_checked(&mut self, value: f32) -> Option<usize>

Tries to write f32 value in native-endian byte order to the beginning of the buffer, advancing the internal cursor. Read more
Source§

fn try_write_f32_ne(&mut self, value: f32) -> Result<usize, TryWriteError>

Tries to write f32 value in native-endian byte order to the beginning of the buffer, advancing the internal cursor. Read more
Source§

fn write_f64_le(&mut self, value: f64) -> usize

Writes f64 value in little-endian byte order to the beginning of the buffer, advancing the internal cursor. Read more
Source§

fn write_f64_le_checked(&mut self, value: f64) -> Option<usize>

Tries to write f64 value in little-endian byte order to the beginning of the buffer, advancing the internal cursor. Read more
Source§

fn try_write_f64_le(&mut self, value: f64) -> Result<usize, TryWriteError>

Tries to write f64 value in little-endian byte order to the beginning of the buffer, advancing the internal cursor. Read more
Source§

fn write_f64_be(&mut self, value: f64) -> usize

Writes f64 value in big-endian byte order to the beginning of the buffer, advancing the internal cursor. Read more
Source§

fn write_f64_be_checked(&mut self, value: f64) -> Option<usize>

Tries to write f64 value in big-endian byte order to the beginning of the buffer, advancing the internal cursor. Read more
Source§

fn try_write_f64_be(&mut self, value: f64) -> Result<usize, TryWriteError>

Tries to write f64 value in big-endian byte order to the beginning of the buffer, advancing the internal cursor. Read more
Source§

fn write_f64_ne(&mut self, value: f64) -> usize

Writes f64 value in native-endian byte order to the beginning of the buffer, advancing the internal cursor. Read more
Source§

fn write_f64_ne_checked(&mut self, value: f64) -> Option<usize>

Tries to write f64 value in native-endian byte order to the beginning of the buffer, advancing the internal cursor. Read more
Source§

fn try_write_f64_ne(&mut self, value: f64) -> Result<usize, TryWriteError>

Tries to write f64 value in native-endian byte order to the beginning of the buffer, advancing the internal cursor. Read more
Source§

fn buffer_mut_from(&mut self, offset: usize) -> &mut [u8]

Returns a remaining_mut slice of the buffer starting from the specified offset. Read more
Source§

fn buffer_mut_from_checked(&mut self, offset: usize) -> Option<&mut [u8]>

Returns a remaining_mut slice of the buffer starting from the specified offset. Read more
Source§

impl<B: Clone + ?Sized> Clone for ChunkWriter<B>

Source§

fn clone(&self) -> ChunkWriter<B>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<B: Debug + ?Sized> Debug for ChunkWriter<B>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<B: ?Sized> Deref for ChunkWriter<B>

Source§

type Target = B

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl<B: ?Sized> DerefMut for ChunkWriter<B>

Source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.
Source§

impl<B> From<B> for ChunkWriter<B>

Source§

fn from(value: B) -> Self

Converts to this type from the input type.
Source§

impl<B: Hash + ?Sized> Hash for ChunkWriter<B>

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl<B: PartialEq + ?Sized> PartialEq for ChunkWriter<B>

Source§

fn eq(&self, other: &ChunkWriter<B>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<B: Copy + ?Sized> Copy for ChunkWriter<B>

Source§

impl<B: Eq + ?Sized> Eq for ChunkWriter<B>

Source§

impl<B: ?Sized> StructuralPartialEq for ChunkWriter<B>

Auto Trait Implementations§

§

impl<B> Freeze for ChunkWriter<B>
where B: Freeze + ?Sized,

§

impl<B> RefUnwindSafe for ChunkWriter<B>
where B: RefUnwindSafe + ?Sized,

§

impl<B> Send for ChunkWriter<B>
where B: Send + ?Sized,

§

impl<B> Sync for ChunkWriter<B>
where B: Sync + ?Sized,

§

impl<B> Unpin for ChunkWriter<B>
where B: Unpin + ?Sized,

§

impl<B> UnwindSafe for ChunkWriter<B>
where B: UnwindSafe + ?Sized,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> ChunkMutExt for T
where T: ChunkMut,

Source§

fn put_varint<V>(&mut self, value: &V) -> Result<usize, EncodeVarintError>
where V: Varint,

Available on crate feature varing only.
Puts type in LEB128 format to the buffer without advancing the internal cursor. Read more
Source§

fn put_varint_at<V>( &mut self, value: &V, offset: usize, ) -> Result<usize, EncodeVarintAtError>
where V: Varint,

Available on crate feature varing only.
Puts type in LEB128 format to the buffer at the specified offset without advancing the internal cursor. Read more
Source§

fn write_varint<V>(&mut self, value: &V) -> Result<usize, EncodeVarintError>
where V: Varint,

Available on crate feature varing only.
Writes type in LEB128 format to the buffer without advancing the internal cursor. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<!> for T

Source§

fn from(t: !) -> T

Converts to this type from the input type.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.