Struct wai_bindgen_wasmer::Le
source · #[repr(packed)]pub struct Le<T>(_);
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 + PartialEq> PartialEq<Le<T>> for Le<T>
impl<T: Endian + PartialEq> PartialEq<Le<T>> for Le<T>
source§impl<T: Endian + PartialOrd> PartialOrd<Le<T>> for Le<T>
impl<T: Endian + PartialOrd> PartialOrd<Le<T>> for Le<T>
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 moreimpl<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> 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§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
§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
§impl<F, W, T, D> Deserialize<With<T, W>, D> for Fwhere
W: DeserializeWith<F, T, D>,
D: Fallible + ?Sized,
F: ?Sized,
impl<F, W, T, D> Deserialize<With<T, W>, D> for Fwhere W: DeserializeWith<F, T, D>, D: Fallible + ?Sized, F: ?Sized,
§fn deserialize(
&self,
deserializer: &mut D
) -> Result<With<T, W>, <D as Fallible>::Error>
fn deserialize( &self, deserializer: &mut D ) -> Result<With<T, W>, <D as Fallible>::Error>
Deserializes using the given deserializer
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
§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.