Struct oftlisp::ast::Args
[−]
[src]
pub struct Args<C: 'static + Context> { pub required: Vec<Symbol>, pub optional: Vec<(Symbol, Gc<Value<C>>)>, pub rest: Option<Symbol>, }
A type that represents the arguments specified for a function.
Fields
required: Vec<Symbol>
The required arguments.
optional: Vec<(Symbol, Gc<Value<C>>)>
The optional arguments, and their default values.
rest: Option<Symbol>
The rest argument, if any.
Methods
impl<C: 'static + Context> Args<C>
[src]
fn bind(
&self,
name: Option<Symbol>,
args: Vec<Gc<Value<C>>>
) -> Result<GcLinkedList<(Symbol, Gc<Value<C>>)>, ArgsBindingError<C>>
[src]
&self,
name: Option<Symbol>,
args: Vec<Gc<Value<C>>>
) -> Result<GcLinkedList<(Symbol, Gc<Value<C>>)>, ArgsBindingError<C>>
Attempts to bind a list of arguments to the names specified in the Args object.
fn from_value(value: Gc<Value<C>>) -> Result<Args<C>, ArgsConvertError<C>>
[src]
Converts a Value to an Args.
fn to_value(&self) -> Gc<Value<C>>
[src]
Converts the Args back to a Value. In general, don't do this.
Trait Implementations
impl<C: 'static + Context> Finalize for Args<C>
[src]
impl<C: 'static + Context> Trace for Args<C>
[src]
unsafe fn trace(&self)
[src]
Marks all contained Gc
s.
unsafe fn root(&self)
[src]
Increments the root-count of all contained Gc
s.
unsafe fn unroot(&self)
[src]
Decrements the root-count of all contained Gc
s.
fn finalize_glue(&self)
[src]
Runs Finalize::finalize() on this object and all contained subobjects Read more
impl<C: 'static + Context> Drop for Args<C>
[src]
impl<C: 'static + Context> Clone for Args<C>
[src]
fn clone(&self) -> Self
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<C: 'static + Context> Debug for Args<C>
[src]
impl<C: 'static + Context> Display for Args<C>
[src]
fn fmt(&self, fmt: &mut Formatter) -> FmtResult
[src]
Formats the value using the given formatter. Read more