Trait kcl_lib::std::args::FromArgs

source ·
pub trait FromArgs<'a>: Sized {
    // Required method
    fn from_args(args: &'a Args, index: usize) -> Result<Self, KclError>;
}
Expand description

Types which impl this trait can be read out of the Args passed into a KCL function.

Required Methods§

source

fn from_args(args: &'a Args, index: usize) -> Result<Self, KclError>

Get this type from the args passed into a KCL function, at the given index in the argument list.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<'a, A, B> FromArgs<'a> for (A, B)
where A: FromArgs<'a>, B: FromArgs<'a>,

source§

fn from_args(args: &'a Args, i: usize) -> Result<Self, KclError>

source§

impl<'a, A, B, C> FromArgs<'a> for (A, B, C)
where A: FromArgs<'a>, B: FromArgs<'a>, C: FromArgs<'a>,

source§

fn from_args(args: &'a Args, i: usize) -> Result<Self, KclError>

source§

impl<'a, A, B, C, D> FromArgs<'a> for (A, B, C, D)
where A: FromArgs<'a>, B: FromArgs<'a>, C: FromArgs<'a>, D: FromArgs<'a>,

source§

fn from_args(args: &'a Args, i: usize) -> Result<Self, KclError>

source§

impl<'a, T> FromArgs<'a> for Option<T>
where T: FromKclValue<'a> + Sized,

source§

fn from_args(args: &'a Args, i: usize) -> Result<Self, KclError>

Implementors§

source§

impl<'a, T> FromArgs<'a> for T
where T: FromKclValue<'a> + Sized,