[][src]Struct mtots_core::ArgSpec

pub struct ArgSpec { /* fields omitted */ }

Implementations

impl ArgSpec[src]

pub fn new(
    req: Vec<RcStr>,
    def: Vec<(RcStr, ConstVal)>,
    var: Option<RcStr>,
    key: Option<RcStr>
) -> Self
[src]

pub fn builder() -> ArgSpecBuilder[src]

pub fn empty() -> Self[src]

pub fn nparams(&self) -> usize[src]

pub fn params(&self) -> Vec<RcStr>[src]

pub fn apply(
    &self,
    flatten_varargs: bool,
    args: Vec<Value>,
    kwargs: Option<HashMap<RcStr, Value>>
) -> Result<(Vec<Value>, Option<HashMap<RcStr, Value>>)>
[src]

pub fn apply_and_append_kwmap(
    &self,
    args: Vec<Value>,
    kwargs: Option<HashMap<RcStr, Value>>
) -> Result<Vec<Value>>
[src]

Like apply, but the kwargs map is converted to a Value and added to args if a kwargs parameter was specified

pub fn to_value(&self) -> Value[src]

Trait Implementations

impl Clone for ArgSpec[src]

impl Debug for ArgSpec[src]

impl Display for ArgSpec[src]

impl<'_, '_> From<&'_ [&'_ str]> for ArgSpec[src]

impl<'_> From<[&'_ str; 0]> for ArgSpec[src]

impl<'_> From<[&'_ str; 1]> for ArgSpec[src]

impl<'_> From<[&'_ str; 2]> for ArgSpec[src]

impl<'_> From<[&'_ str; 3]> for ArgSpec[src]

impl<'_> From<[&'_ str; 4]> for ArgSpec[src]

impl<'_> From<[&'_ str; 5]> for ArgSpec[src]

impl<'_> From<[&'_ str; 6]> for ArgSpec[src]

impl<'_> From<[&'_ str; 7]> for ArgSpec[src]

impl From<()> for ArgSpec[src]

impl From<ArgSpecBuilder> for ArgSpec[src]

Auto Trait Implementations

impl !RefUnwindSafe for ArgSpec

impl !Send for ArgSpec

impl !Sync for ArgSpec

impl Unpin for ArgSpec

impl UnwindSafe for ArgSpec

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.