pub struct Var<V> { /* private fields */ }Implementations§
Source§impl<V> Var<V>
impl<V> Var<V>
pub fn new(path: impl AsRef<str>, value: V) -> Self
pub fn with_metadata( path: impl AsRef<str>, value: V, metadata: VarMetadata, ) -> Self
pub fn symbol(&self) -> &Symbol
pub fn metadata(&self) -> VarMetadata
pub fn hara_metadata(&self) -> Option<Rc<Metadata>>
pub fn set_hara_metadata(&self, metadata: Option<Rc<Metadata>>)
pub fn set_metadata(&self, metadata: VarMetadata) -> VarMetadata
pub fn update_metadata(&self, update: impl FnOnce(&mut VarMetadata))
pub fn origin(&self) -> VarOrigin
pub fn set_origin(&self, origin: VarOrigin)
pub fn identity_address(&self) -> usize
pub fn same_identity(&self, other: &Self) -> bool
pub fn is_control(&self) -> bool
pub fn is_dynamic(&self) -> bool
pub fn is_macro(&self) -> bool
Source§impl<V: Clone + 'static> Var<V>
impl<V: Clone + 'static> Var<V>
pub fn requalify(&self, path: impl AsRef<str>) -> Self
pub fn deref_value(&self) -> V
pub fn schema_contract(&self) -> Option<V>
pub fn set_schema_contract(&self, contract: Option<V>)
pub fn bind(&self, value: V)
pub fn unbind(&self) -> Result<V, String>
pub fn reset_value(&self, value: V) -> V
Trait Implementations§
Source§impl<V> INamespaced for Var<V>
impl<V> INamespaced for Var<V>
Auto Trait Implementations§
impl<V> !RefUnwindSafe for Var<V>
impl<V> !Send for Var<V>
impl<V> !Sync for Var<V>
impl<V> !UnwindSafe for Var<V>
impl<V> Freeze for Var<V>
impl<V> Unpin for Var<V>
impl<V> UnsafeUnpin for Var<V>
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more