Struct linera_wasmer::WasmSliceAccess
source · pub struct WasmSliceAccess<'a, T>where
T: ValueType,{ /* private fields */ }
Expand description
Provides direct memory access to a piece of memory that is owned by WASM
Implementations§
source§impl<'a, T> WasmSliceAccess<'a, T>where
T: ValueType,
impl<'a, T> WasmSliceAccess<'a, T>where
T: ValueType,
source§impl<'a> WasmSliceAccess<'a, u8>
impl<'a> WasmSliceAccess<'a, u8>
sourcepub fn copy_from_slice(&mut self, src: &[u8])
pub fn copy_from_slice(&mut self, src: &[u8])
Writes to the address pointed to by this WasmPtr
in a memory.
sourcepub fn copy_from_slice_min(&mut self, src: &[u8]) -> usize
pub fn copy_from_slice_min(&mut self, src: &[u8]) -> usize
Writes to the address pointed to by this WasmPtr
in a memory.
If the source buffer is smaller than the destination buffer only the correct amount of bytes will be copied
Returns the number of bytes copied
source§impl<'a, T> WasmSliceAccess<'a, T>where
T: ValueType,
impl<'a, T> WasmSliceAccess<'a, T>where
T: ValueType,
sourcepub fn as_mut_uninit(&mut self) -> &mut [MaybeUninit<T>]
pub fn as_mut_uninit(&mut self) -> &mut [MaybeUninit<T>]
Returns a mutable slice that is not yet initialized
Trait Implementations§
Auto Trait Implementations§
impl<'a, T> Freeze for WasmSliceAccess<'a, T>
impl<'a, T> RefUnwindSafe for WasmSliceAccess<'a, T>where
T: RefUnwindSafe,
impl<'a, T> !Send for WasmSliceAccess<'a, T>
impl<'a, T> !Sync for WasmSliceAccess<'a, T>
impl<'a, T> Unpin for WasmSliceAccess<'a, T>where
T: Unpin,
impl<'a, T> !UnwindSafe for WasmSliceAccess<'a, T>
Blanket Implementations§
source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§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> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§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.
source§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<T> ToHex for T
impl<T> ToHex for T
source§fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
Encode the hex strict representing
self
into the result. Lower case
letters are used (e.g. f9b4ca
)source§fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
Encode the hex strict representing
self
into the result. Upper case
letters are used (e.g. F9B4CA
)