Struct binaryninja::databuffer::DataBuffer
source · pub struct DataBuffer(/* private fields */);
Implementations§
source§impl DataBuffer
impl DataBuffer
pub fn get_data(&self) -> &[u8] ⓘ
pub fn get_data_at(&self, offset: usize) -> &[u8] ⓘ
sourcepub fn get_slice(&self, start: usize, len: usize) -> Option<Self>
pub fn get_slice(&self, start: usize, len: usize) -> Option<Self>
Create a copy of a especified part of the data
sourcepub unsafe fn set_len(&mut self, len: usize)
pub unsafe fn set_len(&mut self, len: usize)
change the size of the allocated data, if new size is bigger data is need to be initialized
sourcepub fn append_data(&self, data: &[u8])
pub fn append_data(&self, data: &[u8])
concat the contents of data
into self
sourcepub unsafe fn set_byte_at(&mut self, offset: usize, byte: u8)
pub unsafe fn set_byte_at(&mut self, offset: usize, byte: u8)
Set the value of the byte at offset
pub fn set_data(&mut self, data: &[u8])
pub fn to_escaped_string( &self, null_terminates: bool, escape_printable: bool ) -> BnString
pub fn from_escaped_string(value: &BnString) -> Self
pub fn to_base64(&self) -> BnString
pub fn from_base64(value: &BnString) -> Self
pub fn zlib_compress(&self) -> Self
pub fn zlib_decompress(&self) -> Self
pub fn lzma_decompress(&self) -> Self
pub fn lzma2_decompress(&self) -> Self
pub fn xz_decompress(&self) -> Self
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn new(data: &[u8]) -> Result<Self, ()>
Trait Implementations§
source§impl AsRef<[u8]> for DataBuffer
impl AsRef<[u8]> for DataBuffer
source§impl Borrow<[u8]> for DataBuffer
impl Borrow<[u8]> for DataBuffer
source§impl Clone for DataBuffer
impl Clone for DataBuffer
source§impl Default for DataBuffer
impl Default for DataBuffer
source§impl Drop for DataBuffer
impl Drop for DataBuffer
source§impl Index<RangeFull> for DataBuffer
impl Index<RangeFull> for DataBuffer
source§impl Index<RangeInclusive<usize>> for DataBuffer
impl Index<RangeInclusive<usize>> for DataBuffer
source§impl Index<usize> for DataBuffer
impl Index<usize> for DataBuffer
source§impl Ord for DataBuffer
impl Ord for DataBuffer
source§impl PartialEq for DataBuffer
impl PartialEq for DataBuffer
source§impl PartialOrd for DataBuffer
impl PartialOrd for DataBuffer
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl TryFrom<&[u8]> for DataBuffer
impl TryFrom<&[u8]> for DataBuffer
impl Eq for DataBuffer
Auto Trait Implementations§
impl RefUnwindSafe for DataBuffer
impl !Send for DataBuffer
impl !Sync for DataBuffer
impl Unpin for DataBuffer
impl UnwindSafe for DataBuffer
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