Struct yksom::vm::objects::UpVar [−][src]
pub struct UpVar { /* fields omitted */ }
An UpVar references either a variable on the stack or, if the UpVar is closed, a copy of that
variable inside the struct itself (the closed
field). This scheme is very similar to that
used in Lua; the best explanation I know of can
be found at: http://www.craftinginterpreters.com/closures.html.
Implementations
impl UpVar
[src]
pub fn new(prev: Option<Gc<UpVar>>, ptr: Gc<Val>) -> Self
[src]
pub fn to_gc(&self) -> Gc<Val>
[src]
pub fn close(&self)
[src]
pub fn is_closed(&self) -> bool
[src]
pub fn prev(&self) -> Option<Gc<UpVar>>
[src]
pub fn set_prev(&self, prev: Option<Gc<UpVar>>)
[src]
Trait Implementations
Auto Trait Implementations
impl !NoTrace for UpVar
impl !RefUnwindSafe for UpVar
impl Send for UpVar
impl !Sync for UpVar
impl Unpin for UpVar
impl !UnwindSafe for UpVar
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
U: TryFrom<T>,