pub struct Namespace<V> { /* private fields */ }Implementations§
Source§impl<V> Namespace<V>
impl<V> Namespace<V>
pub fn new(name: impl AsRef<str>) -> Self
pub fn name(&self) -> &Symbol
pub fn same_identity(&self, other: &Self) -> bool
pub fn identity_address(&self) -> usize
pub fn intern(&self, name: impl AsRef<str>, value: V) -> Var<V>where
V: Clone + 'static,
pub fn intern_with_metadata(
&self,
name: impl AsRef<str>,
value: V,
metadata: VarMetadata,
) -> Var<V>where
V: Clone + 'static,
pub fn intern_with_origin(
&self,
name: impl AsRef<str>,
value: V,
origin: VarOrigin,
) -> Var<V>where
V: Clone + 'static,
pub fn map_var(&self, symbol: Symbol, var: Var<V>)
pub fn unmap(&self, symbol: &Symbol) -> Option<Var<V>>
pub fn resolve(&self, symbol: &Symbol) -> Option<Var<V>>where
V: Clone,
pub fn unalias(&self, alias: impl AsRef<str>) -> Option<Namespace<V>>
pub fn alias(&self, alias: impl AsRef<str>, namespace: Namespace<V>)
pub fn lazy_alias(&self, alias: impl AsRef<str>, target: impl AsRef<str>)
pub fn lazy_target(&self, alias: impl AsRef<str>) -> Option<Symbol>
pub fn lazy_aliases(&self) -> Vec<(Symbol, Symbol)>
pub fn import(&self, name: impl AsRef<str>, host_type: impl Into<String>)
pub fn imported(&self, name: &Symbol) -> Option<String>
pub fn set_native_flavor(&self, flavor: Option<String>)
pub fn native_flavor(&self) -> Option<String>
pub fn set_role(&self, role: impl Into<String>)
pub fn set_foundation_visibility( &self, exposed: Option<&HashSet<String>>, excluded: &HashSet<String>, blank: bool, )
pub fn role(&self) -> String
pub fn mappings(&self) -> Vec<(Symbol, Var<V>)>where
V: Clone,
pub fn aliases(&self) -> Vec<(Symbol, Namespace<V>)>where
V: Clone,
pub fn imports(&self) -> Vec<(Symbol, String)>
Trait Implementations§
Auto Trait Implementations§
impl<V> !RefUnwindSafe for Namespace<V>
impl<V> !Send for Namespace<V>
impl<V> !Sync for Namespace<V>
impl<V> !UnwindSafe for Namespace<V>
impl<V> Freeze for Namespace<V>
impl<V> Unpin for Namespace<V>
impl<V> UnsafeUnpin for Namespace<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