#[repr(packed(1))]pub struct Le<T>(/* private fields */);
Expand description
Helper type representing a 1-byte-aligned little-endian value in memory.
This type is used in slice types for Wasmer host bindings. Guest types are not guaranteed to be either aligned or in the native endianness. This type wraps these types and provides explicit getters/setters to interact with the underlying value in a safe host-agnostic manner.
Implementations§
Source§impl<T> Le<T>where
T: Endian,
impl<T> Le<T>where
T: Endian,
Sourcepub fn new(t: T) -> Le<T>
pub fn new(t: T) -> Le<T>
Creates a new Le<T>
value where the internals are stored in a way
that’s safe to copy into wasm linear memory.
Trait Implementations§
Source§impl<T: Endian + Ord> Ord for Le<T>
impl<T: Endian + Ord> Ord for Le<T>
Source§impl<T: Endian + PartialOrd> PartialOrd for Le<T>
impl<T: Endian + PartialOrd> PartialOrd for Le<T>
impl<T: AllBytesValid> AllBytesValid for Le<T>
impl<T: Copy> Copy for Le<T>
impl<T: Endian + Eq> Eq for Le<T>
Auto Trait Implementations§
impl<T> Freeze for Le<T>where
T: Freeze,
impl<T> RefUnwindSafe for Le<T>where
T: RefUnwindSafe,
impl<T> Send for Le<T>where
T: Send,
impl<T> Sync for Le<T>where
T: Sync,
impl<T> Unpin for Le<T>where
T: Unpin,
impl<T> UnwindSafe for Le<T>where
T: UnwindSafe,
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.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> 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>
Returns the layout of the type.
Source§impl<T> Upcastable for T
impl<T> Upcastable for T
Source§fn upcast_any_ref(&self) -> &(dyn Any + 'static)
fn upcast_any_ref(&self) -> &(dyn Any + 'static)
upcast ref
Source§fn upcast_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn upcast_any_mut(&mut self) -> &mut (dyn Any + 'static)
upcast mut ref