pub struct BinaryData {
pub start: [u8; 2],
pub data: Vec<u8>,
/* private fields */
}Expand description
Structured representation of binary data on disk
Fields§
§start: [u8; 2]§data: Vec<u8>Implementations§
Trait Implementations§
Source§impl DiskStruct for BinaryData
impl DiskStruct for BinaryData
Source§fn from_bytes(dat: &[u8]) -> Result<Self, DiskStructError>
fn from_bytes(dat: &[u8]) -> Result<Self, DiskStructError>
Create structure using flattened bytes (typically from disk)
Source§fn update_from_bytes(&mut self, dat: &[u8]) -> Result<(), DiskStructError>
fn update_from_bytes(&mut self, dat: &[u8]) -> Result<(), DiskStructError>
Update with flattened bytes (useful mostly as a crutch within a2kit_macro)
Source§fn from_bytes_adv(
bytes: &[u8],
ptr: &mut usize,
) -> Result<Self, DiskStructError>where
Self: Sized,
fn from_bytes_adv(
bytes: &[u8],
ptr: &mut usize,
) -> Result<Self, DiskStructError>where
Self: Sized,
convenience function to call
from_bytes and increment ptr by len()Auto Trait Implementations§
impl Freeze for BinaryData
impl RefUnwindSafe for BinaryData
impl Send for BinaryData
impl Sync for BinaryData
impl Unpin for BinaryData
impl UnsafeUnpin for BinaryData
impl UnwindSafe for BinaryData
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