Struct UntypedRetVal

Source
pub struct UntypedRetVal { /* private fields */ }
Expand description

A value returned by a guest function.

Since the Rust type system cannot know the type of the returned value, the user must use the appropriate From implementation or as_T method.

Implementations§

Source§

impl UntypedRetVal

Source

pub fn as_f32(&self) -> f32

Source§

impl UntypedRetVal

Source

pub fn as_f64(&self) -> f64

Source§

impl UntypedRetVal

Source

pub fn as_u8(&self) -> u8

Source§

impl UntypedRetVal

Source

pub fn as_u16(&self) -> u16

Source§

impl UntypedRetVal

Source

pub fn as_u32(&self) -> u32

Source§

impl UntypedRetVal

Source

pub fn as_u64(&self) -> u64

Source§

impl UntypedRetVal

Source

pub fn as_i8(&self) -> i8

Source§

impl UntypedRetVal

Source

pub fn as_i16(&self) -> i16

Source§

impl UntypedRetVal

Source

pub fn as_i32(&self) -> i32

Source§

impl UntypedRetVal

Source

pub fn as_i64(&self) -> i64

Source§

impl UntypedRetVal

Source

pub fn as_bool(&self) -> bool

Source

pub fn as_ptr<T>(&self) -> *const T

Source

pub fn as_mut<T>(&self) -> *mut T

Trait Implementations§

Source§

impl Clone for UntypedRetVal

Source§

fn clone(&self) -> UntypedRetVal

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for UntypedRetVal

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for UntypedRetVal

Source§

fn default() -> UntypedRetVal

Returns the “default value” for a type. Read more
Source§

impl Display for UntypedRetVal

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<&UntypedRetVal> for bool

Source§

fn from(retval: &UntypedRetVal) -> bool

Converts to this type from the input type.
Source§

impl From<&UntypedRetVal> for f32

Source§

fn from(retval: &UntypedRetVal) -> f32

Converts to this type from the input type.
Source§

impl From<&UntypedRetVal> for f64

Source§

fn from(retval: &UntypedRetVal) -> f64

Converts to this type from the input type.
Source§

impl From<&UntypedRetVal> for i16

Source§

fn from(retval: &UntypedRetVal) -> i16

Converts to this type from the input type.
Source§

impl From<&UntypedRetVal> for i32

Source§

fn from(retval: &UntypedRetVal) -> i32

Converts to this type from the input type.
Source§

impl From<&UntypedRetVal> for i64

Source§

fn from(retval: &UntypedRetVal) -> i64

Converts to this type from the input type.
Source§

impl From<&UntypedRetVal> for i8

Source§

fn from(retval: &UntypedRetVal) -> i8

Converts to this type from the input type.
Source§

impl From<&UntypedRetVal> for u16

Source§

fn from(retval: &UntypedRetVal) -> u16

Converts to this type from the input type.
Source§

impl From<&UntypedRetVal> for u32

Source§

fn from(retval: &UntypedRetVal) -> u32

Converts to this type from the input type.
Source§

impl From<&UntypedRetVal> for u64

Source§

fn from(retval: &UntypedRetVal) -> u64

Converts to this type from the input type.
Source§

impl From<&UntypedRetVal> for u8

Source§

fn from(retval: &UntypedRetVal) -> u8

Converts to this type from the input type.
Source§

impl From<RegVal> for UntypedRetVal

Source§

fn from(reg: RegVal) -> UntypedRetVal

Converts to this type from the input type.
Source§

impl<T: Into<Val>> From<T> for UntypedRetVal

Source§

fn from(v: T) -> UntypedRetVal

Converts to this type from the input type.
Source§

impl From<UntypedRetVal> for bool

Source§

fn from(retval: UntypedRetVal) -> bool

Converts to this type from the input type.
Source§

impl From<UntypedRetVal> for f32

Source§

fn from(retval: UntypedRetVal) -> f32

Converts to this type from the input type.
Source§

impl From<UntypedRetVal> for f64

Source§

fn from(retval: UntypedRetVal) -> f64

Converts to this type from the input type.
Source§

impl From<UntypedRetVal> for i16

Source§

fn from(retval: UntypedRetVal) -> i16

Converts to this type from the input type.
Source§

impl From<UntypedRetVal> for i32

Source§

fn from(retval: UntypedRetVal) -> i32

Converts to this type from the input type.
Source§

impl From<UntypedRetVal> for i64

Source§

fn from(retval: UntypedRetVal) -> i64

Converts to this type from the input type.
Source§

impl From<UntypedRetVal> for i8

Source§

fn from(retval: UntypedRetVal) -> i8

Converts to this type from the input type.
Source§

impl From<UntypedRetVal> for lucet_untyped_retval

Source§

fn from(retval: UntypedRetVal) -> lucet_untyped_retval

Converts to this type from the input type.
Source§

impl From<UntypedRetVal> for u16

Source§

fn from(retval: UntypedRetVal) -> u16

Converts to this type from the input type.
Source§

impl From<UntypedRetVal> for u32

Source§

fn from(retval: UntypedRetVal) -> u32

Converts to this type from the input type.
Source§

impl From<UntypedRetVal> for u64

Source§

fn from(retval: UntypedRetVal) -> u64

Converts to this type from the input type.
Source§

impl From<UntypedRetVal> for u8

Source§

fn from(retval: UntypedRetVal) -> u8

Converts to this type from the input type.
Source§

impl UntypedRetValInternal for UntypedRetVal

Source§

fn fp(&self) -> __m128

Source§

fn gp(&self) -> u64

Source§

impl Copy for UntypedRetVal

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.