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) -> Arg<'a>

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 Debug for Arg<'_>

As a derived Debug would show it, but an application value, which has no Debug of its own, is Custom(..).

Source§

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

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

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

Source§

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

Converts to this type from the input type.
Source§

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

Source§

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

Converts to this type from the input type.
Source§

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

Source§

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

Converts to this type from the input type.
Source§

impl From<f32> for Arg<'_>

Source§

fn from(x: f32) -> Arg<'_>

Converts to this type from the input type.
Source§

impl From<f64> for Arg<'_>

Source§

fn from(x: f64) -> Arg<'_>

Converts to this type from the input type.
Source§

impl From<i8> for Arg<'_>

Source§

fn from(n: i8) -> Arg<'_>

Converts to this type from the input type.
Source§

impl From<i16> for Arg<'_>

Source§

fn from(n: i16) -> Arg<'_>

Converts to this type from the input type.
Source§

impl From<i32> for Arg<'_>

Source§

fn from(n: i32) -> Arg<'_>

Converts to this type from the input type.
Source§

impl From<i64> for Arg<'_>

Source§

fn from(n: i64) -> Arg<'_>

Converts to this type from the input type.
Source§

impl From<u8> for Arg<'_>

Source§

fn from(n: u8) -> Arg<'_>

Converts to this type from the input type.
Source§

impl From<u16> for Arg<'_>

Source§

fn from(n: u16) -> Arg<'_>

Converts to this type from the input type.
Source§

impl From<u32> for Arg<'_>

Source§

fn from(n: u32) -> Arg<'_>

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> ErasedDestructor for T
where T: 'static,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

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

Source§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
Source§

impl<E, T, Request, Encoding> FromReq<Patch<Encoding>, Request, E> for T
where Request: Req<E> + Send + 'static, Encoding: Decodes<T>, E: FromServerFnError,

Source§

async fn from_req(req: Request) -> Result<T, E>

Attempts to deserialize the arguments from a request.
Source§

impl<E, T, Request, Encoding> FromReq<Post<Encoding>, Request, E> for T
where Request: Req<E> + Send + 'static, Encoding: Decodes<T>, E: FromServerFnError,

Source§

async fn from_req(req: Request) -> Result<T, E>

Attempts to deserialize the arguments from a request.
Source§

impl<E, T, Request, Encoding> FromReq<Put<Encoding>, Request, E> for T
where Request: Req<E> + Send + 'static, Encoding: Decodes<T>, E: FromServerFnError,

Source§

async fn from_req(req: Request) -> Result<T, E>

Attempts to deserialize the arguments from a request.
Source§

impl<E, Encoding, Response, T> FromRes<Patch<Encoding>, Response, E> for T
where Response: ClientRes<E> + Send, Encoding: Decodes<T>, E: FromServerFnError,

Source§

async fn from_res(res: Response) -> Result<T, E>

Attempts to deserialize the outputs from a response.
Source§

impl<E, Encoding, Response, T> FromRes<Post<Encoding>, Response, E> for T
where Response: ClientRes<E> + Send, Encoding: Decodes<T>, E: FromServerFnError,

Source§

async fn from_res(res: Response) -> Result<T, E>

Attempts to deserialize the outputs from a response.
Source§

impl<E, Encoding, Response, T> FromRes<Put<Encoding>, Response, E> for T
where Response: ClientRes<E> + Send, Encoding: Decodes<T>, E: FromServerFnError,

Source§

async fn from_res(res: Response) -> Result<T, E>

Attempts to deserialize the outputs from a response.
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> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

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 more
Source§

impl<E, T, Encoding, Request> IntoReq<Patch<Encoding>, Request, E> for T
where Request: ClientReq<E>, Encoding: Encodes<T>, E: FromServerFnError,

Source§

fn into_req(self, path: &str, accepts: &str) -> Result<Request, E>

Attempts to serialize the arguments into an HTTP request.
Source§

impl<E, T, Encoding, Request> IntoReq<Post<Encoding>, Request, E> for T
where Request: ClientReq<E>, Encoding: Encodes<T>, E: FromServerFnError,

Source§

fn into_req(self, path: &str, accepts: &str) -> Result<Request, E>

Attempts to serialize the arguments into an HTTP request.
Source§

impl<E, T, Encoding, Request> IntoReq<Put<Encoding>, Request, E> for T
where Request: ClientReq<E>, Encoding: Encodes<T>, E: FromServerFnError,

Source§

fn into_req(self, path: &str, accepts: &str) -> Result<Request, E>

Attempts to serialize the arguments into an HTTP request.
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> SerializableKey for T

Source§

fn ser_key(&self) -> String

Serializes the key to a unique string. Read more
Source§

impl<T> StorageAccess<T> for T

Source§

fn as_borrowed(&self) -> &T

Borrows the value.
Source§

fn into_taken(self) -> T

Takes the value.
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.
Source§

impl<S, T> Upcast<T> for S
where T: UpcastFrom<S> + ?Sized, S: ?Sized,

Source§

fn upcast(&self) -> &T
where Self: ErasableGeneric, T: Sized + ErasableGeneric<Repr = Self::Repr>,

Perform a zero-cost type-safe upcast to a wider ref type within the Wasm bindgen generics type system. Read more
Source§

fn upcast_into(self) -> T
where Self: Sized + ErasableGeneric, T: Sized + ErasableGeneric<Repr = Self::Repr>,

Perform a zero-cost type-safe upcast to a wider type within the Wasm bindgen generics type system. Read more