pub struct GeneratedNamespaceConfig { /* private fields */ }Implementations§
Source§impl GeneratedNamespaceConfig
impl GeneratedNamespaceConfig
pub fn rewrite(&self, form: Form) -> Form
Sourcepub fn rewrite_for_macroexpand(&self, form: Form) -> Form
pub fn rewrite_for_macroexpand(&self, form: Form) -> Form
Rewrites a form before macro expansion. In addition to ordinary
namespace aliases and :refer entries, explicit :refer-macros
declarations canonicalize list operators to the defining macro Var.
Source§impl GeneratedNamespaceConfig
impl GeneratedNamespaceConfig
pub fn defaults() -> Self
pub fn configure(clauses: &[Form]) -> Result<Self, String>
pub fn configure_with( clauses: &[Form], available: impl Fn(&str) -> bool, ) -> Result<Self, String>
pub fn required_namespaces(&self) -> &[String]
pub fn lazy_target(&self, alias: &str) -> Option<&str>
pub fn used_namespaces(&self) -> &[String]
pub fn used_symbol_excluded(&self, namespace: &str, symbol: &str) -> bool
pub fn internal_access(&self) -> &HashSet<String>
pub fn excluded_foundation(&self) -> &HashSet<String>
pub fn excluded_foundation_libraries(&self) -> &HashSet<String>
pub fn exposed_foundation(&self) -> Option<&HashSet<String>>
pub fn blank(&self) -> bool
pub fn native_flavor(&self) -> Option<&str>
pub fn native_imports(&self) -> &[(String, String)]
pub fn native_flavor_imports(&self) -> &[(String, String)]
pub fn role(&self) -> &str
pub fn aliases(&self) -> Vec<(String, String)>
pub fn global_alias(&self) -> Option<&str>
pub fn declared_global_imports(&self) -> &[String]
pub fn set_global_aliases( &mut self, aliases: impl IntoIterator<Item = (String, String)>, )
pub fn apply_require( &mut self, form: &Form, available: &impl Fn(&str) -> bool, ) -> Result<(), String>
pub fn apply_use( &mut self, form: &Form, available: &impl Fn(&str) -> bool, ) -> Result<(), String>
Trait Implementations§
Source§impl Clone for GeneratedNamespaceConfig
impl Clone for GeneratedNamespaceConfig
Source§fn clone(&self) -> GeneratedNamespaceConfig
fn clone(&self) -> GeneratedNamespaceConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GeneratedNamespaceConfig
impl Debug for GeneratedNamespaceConfig
Source§impl Default for GeneratedNamespaceConfig
impl Default for GeneratedNamespaceConfig
Source§fn default() -> GeneratedNamespaceConfig
fn default() -> GeneratedNamespaceConfig
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for GeneratedNamespaceConfig
impl RefUnwindSafe for GeneratedNamespaceConfig
impl Send for GeneratedNamespaceConfig
impl Sync for GeneratedNamespaceConfig
impl Unpin for GeneratedNamespaceConfig
impl UnsafeUnpin for GeneratedNamespaceConfig
impl UnwindSafe for GeneratedNamespaceConfig
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