pub enum Chunk {
Envelope {
envelope_id: TypeID,
id: TypeID,
chunks: Vec<Chunk>,
little_endian: bool,
aligned: bool,
},
Data {
id: TypeID,
data: Vec<u8>,
little_endian: bool,
},
}
Variants§
Implementations§
Source§impl Chunk
impl Chunk
pub fn from_data(data: &[u8], little_endian: Option<bool>) -> Result<Self>
pub fn from_data_with_size( data: &[u8], size_override: usize, little_endian: Option<bool>, ) -> Result<Self>
pub fn is_little_endian(&self) -> bool
pub fn create(envelope_id: TypeID, id: TypeID, little_endian: bool) -> Self
pub fn append_chunk(&mut self, chunk: Chunk)
pub fn write<W: Write>(&self, w: &mut W) -> Result<()>
pub fn has_envelope_type( &self, envelope_type_id: TypeID, type_id: TypeID, ) -> bool
pub fn has_data_type(&self, type_id: TypeID) -> bool
pub fn data_chunks(&self) -> Vec<(TypeID, &Vec<u8>)>
pub fn all_chunks(&self) -> Vec<(TypeID, &Chunk)>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Chunk
impl RefUnwindSafe for Chunk
impl Send for Chunk
impl Sync for Chunk
impl Unpin for Chunk
impl UnwindSafe for Chunk
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