pub struct StringHeap {
pub pos: u64,
pub bytes: Vec<u8>,
pub free_pos: u64,
}
Fields§
§pos: u64
§bytes: Vec<u8>
§free_pos: u64
Implementations§
Source§impl StringHeap
impl StringHeap
pub fn from(pos: u64) -> Self
pub fn get_free_offset_args<T>(&mut self, obj: &T) -> i32where
T: for<'a> BinWrite<Args<'a> = (&'a mut StringHeap,)> + Debug,
pub fn get_free_offset<T>(&mut self, obj: &T) -> i32
pub fn get_free_offset_string(&mut self, str: &String) -> i32
pub fn read<R, T>(&self, reader: &mut R, offset: i32) -> T
pub fn read_args<R, T>(&self, reader: &mut R, offset: i32) -> T
pub fn read_string<R>(&self, reader: &mut R, offset: u32) -> String
Trait Implementations§
Source§impl BinWrite for StringHeap
impl BinWrite for StringHeap
Source§fn write_options<W: Write + Seek>(
&self,
writer: &mut W,
endian: Endian,
(): Self::Args<'_>,
) -> Result<(), Error>
fn write_options<W: Write + Seek>( &self, writer: &mut W, endian: Endian, (): Self::Args<'_>, ) -> Result<(), Error>
§fn write_be<W>(&self, writer: &mut W) -> Result<(), Error>
fn write_be<W>(&self, writer: &mut W) -> Result<(), Error>
Write
Self
to the writer assuming big-endian byte order. Read more§fn write_le<W>(&self, writer: &mut W) -> Result<(), Error>
fn write_le<W>(&self, writer: &mut W) -> Result<(), Error>
Write
Self
to the writer assuming little-endian byte order. Read moreAuto Trait Implementations§
impl Freeze for StringHeap
impl RefUnwindSafe for StringHeap
impl Send for StringHeap
impl Sync for StringHeap
impl Unpin for StringHeap
impl UnwindSafe for StringHeap
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