pub struct upvars;
Expand description
Lists the collected environment of a function.
ⓘ
builtin! fn upvars (ConValue::Function(f)) -> IResult<ConValue>
{
let uv = f.upvars(); for (name, bind) in uv.iter()
{
match bind
{
Some(bind) =>println!("{name}: {bind}"), None =>
println!("{name}: _"),
}
} Ok(ConValue::Empty)
}
Trait Implementations§
Source§impl Callable for upvars
impl Callable for upvars
Source§fn call(&self, env: &mut Environment, args: &[ConValue]) -> IResult<ConValue>
fn call(&self, env: &mut Environment, args: &[ConValue]) -> IResult<ConValue>
Calls this Callable in the provided Environment, with ConValue args
The Callable is responsible for checking the argument count and validating types
The Callable is responsible for checking the argument count and validating types
Auto Trait Implementations§
impl Freeze for upvars
impl RefUnwindSafe for upvars
impl Send for upvars
impl Sync for upvars
impl Unpin for upvars
impl UnwindSafe for upvars
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more