Crate in_situ

Crate in_situ 

Source
Expand description

In Situ Endian-independent Bytes Access

§Feature Gates

  • bytes: For abstracting Bytes and BytesMut.
  • bstr: For complementing InSitu::utf8() with InSitu::bstr().

Re-exports§

pub use bstr;
pub use byteorder;
pub use bytes;

Enums§

Order
Helper type describing the underlying byte order.
Take
Helper type specifying whether to take the bytes of the header only or the whole packet.

Constants§

F32
Size of f32 in bytes.
F64
Size of f64 in bytes.
I8
Size of i8 in bytes.
I16
Size of i16 in bytes.
I24
Size of i24 in bytes.
I32
Size of i32 in bytes.
I64
Size of i64 in bytes.
I128
Size of i128 in bytes.
U8
Size of u8 in bytes.
U16
Size of u16 in bytes.
U24
Size of u24 in bytes.
U32
Size of u32 in bytes.
U64
Size of u64 in bytes.
U128
Size of u128 in bytes.

Traits§

InSitu
Provides endian-independent immutable bytes access.
InSituMut
Provides endian-independent mutable bytes access.
Raw
Abstracts immutable as well as mutable generic bytes view types like &[u8] and &mut [u8] as immutable views.
RawMut
Abstracts mutable generic bytes view types like &mut [u8] as mutable view.

Functions§

aligned
Calculates aligned offset in bytes.
padding
Calculates padding of aligned offset in bytes.