Skip to main content

Arg

Enum Arg 

Source
#[non_exhaustive]
pub enum Arg<'a> { Str(&'a str), Int(i64), Float(f64), Decimal(&'a str), Custom(&'a dyn CustomValue), Unset, DateTime(&'a DateTime<'a>), }
Expand description

A positional argument: slot i of the call site is args[i] (the manifest’s slot order). Small on purpose: every variant is a code path in the wasm. Non-exhaustive, so variants can be added.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Str(&'a str)

A string.

§

Int(i64)

An integer.

§

Float(f64)

A float (finite values format; others are a Bad Operand).

§

Decimal(&'a str)

An exact decimal as number-literal text (-12.50, 1e3).

§

Custom(&'a dyn CustomValue)

An application value.

§

Unset

No value: Unresolved Variable.

§

DateTime(&'a DateTime<'a>)

A date/time (by reference, so Arg stays small).

Trait Implementations§

Source§

impl<'a> Clone for Arg<'a>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl<'a> Copy for Arg<'a>

Source§

impl<'a> From<&'a DateTime<'a>> for Arg<'a>

Source§

fn from(d: &'a DateTime<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a String> for Arg<'a>

Source§

fn from(s: &'a String) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a str> for Arg<'a>

Source§

fn from(s: &'a str) -> Self

Converts to this type from the input type.
Source§

impl From<f32> for Arg<'_>

Source§

fn from(x: f32) -> Self

Converts to this type from the input type.
Source§

impl From<f64> for Arg<'_>

Source§

fn from(x: f64) -> Self

Converts to this type from the input type.
Source§

impl From<i8> for Arg<'_>

Source§

fn from(n: i8) -> Self

Converts to this type from the input type.
Source§

impl From<i16> for Arg<'_>

Source§

fn from(n: i16) -> Self

Converts to this type from the input type.
Source§

impl From<i32> for Arg<'_>

Source§

fn from(n: i32) -> Self

Converts to this type from the input type.
Source§

impl From<i64> for Arg<'_>

Source§

fn from(n: i64) -> Self

Converts to this type from the input type.
Source§

impl From<u8> for Arg<'_>

Source§

fn from(n: u8) -> Self

Converts to this type from the input type.
Source§

impl From<u16> for Arg<'_>

Source§

fn from(n: u16) -> Self

Converts to this type from the input type.
Source§

impl From<u32> for Arg<'_>

Source§

fn from(n: u32) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl<'a> !RefUnwindSafe for Arg<'a>

§

impl<'a> !Send for Arg<'a>

§

impl<'a> !Sync for Arg<'a>

§

impl<'a> !UnwindSafe for Arg<'a>

§

impl<'a> Freeze for Arg<'a>

§

impl<'a> Unpin for Arg<'a>

§

impl<'a> UnsafeUnpin for Arg<'a>

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> 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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.