pub struct MemoryRef<'a>(/* private fields */);
Expand description
A reference to a memory instance
Implementations§
Trait Implementations§
Source§impl MemoryStringExt for MemoryRef<'_>
impl MemoryStringExt for MemoryRef<'_>
Source§fn load_cstr(&self, offset: usize, len: usize) -> Result<&CStr>
fn load_cstr(&self, offset: usize, len: usize) -> Result<&CStr>
Load a C-style string from memory
Source§fn load_cstr_until_nul(&self, offset: usize, max_len: usize) -> Result<&CStr>
fn load_cstr_until_nul(&self, offset: usize, max_len: usize) -> Result<&CStr>
Load a C-style string from memory, stopping at the first nul byte
Source§fn load_string(&self, offset: usize, len: usize) -> Result<String>
fn load_string(&self, offset: usize, len: usize) -> Result<String>
Load a UTF-8 string from memory
Source§fn load_cstring(&self, offset: usize, len: usize) -> Result<CString>
fn load_cstring(&self, offset: usize, len: usize) -> Result<CString>
Load a C-style string from memory
Auto Trait Implementations§
impl<'a> Freeze for MemoryRef<'a>
impl<'a> RefUnwindSafe for MemoryRef<'a>
impl<'a> Send for MemoryRef<'a>
impl<'a> Sync for MemoryRef<'a>
impl<'a> Unpin for MemoryRef<'a>
impl<'a> UnwindSafe for MemoryRef<'a>
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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
Source§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
Source§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Gets the layout of the type.