[−][src]Struct garando_pos::hygiene::SyntaxContext
A SyntaxContext represents a chain of macro expansions (represented by marks).
Implementations
impl SyntaxContext
[src]
pub fn empty() -> Self
[src]
pub fn apply_mark(self, mark: Mark) -> SyntaxContext
[src]
Extend a syntax context with a given mark
pub fn remove_mark(&mut self) -> Mark
[src]
pub fn adjust(&mut self, expansion: Mark) -> Option<Mark>
[src]
Adjust this context for resolution in a scope created by the given expansion.
This returns the expansion whose definition scope we use to privacy check the resolution,
or None
if we privacy check as usual (i.e. not w.r.t. a macro definition scope).
pub fn glob_adjust(
&mut self,
expansion: Mark,
glob_ctxt: SyntaxContext
) -> Option<Option<Mark>>
[src]
&mut self,
expansion: Mark,
glob_ctxt: SyntaxContext
) -> Option<Option<Mark>>
Adjust this context for resolution in a scope created by the given expansion
via a glob import with the given SyntaxContext
.
This returns None
if the context cannot be glob-adjusted.
Otherwise, it returns the scope to use when privacy checking (see adjust
for details).
pub fn reverse_glob_adjust(
&mut self,
expansion: Mark,
glob_ctxt: SyntaxContext
) -> Option<Option<Mark>>
[src]
&mut self,
expansion: Mark,
glob_ctxt: SyntaxContext
) -> Option<Option<Mark>>
Undo glob_adjust
if possible:
pub fn modern(self) -> SyntaxContext
[src]
pub fn outer(self) -> Mark
[src]
Trait Implementations
impl Clone for SyntaxContext
[src]
fn clone(&self) -> SyntaxContext
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for SyntaxContext
[src]
impl Debug for SyntaxContext
[src]
impl Default for SyntaxContext
[src]
fn default() -> SyntaxContext
[src]
impl<'de> Deserialize<'de> for SyntaxContext
[src]
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
[src]
D: Deserializer<'de>,
impl Eq for SyntaxContext
[src]
impl Hash for SyntaxContext
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Ord for SyntaxContext
[src]
fn cmp(&self, other: &SyntaxContext) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialEq<SyntaxContext> for SyntaxContext
[src]
fn eq(&self, other: &SyntaxContext) -> bool
[src]
fn ne(&self, other: &SyntaxContext) -> bool
[src]
impl PartialOrd<SyntaxContext> for SyntaxContext
[src]
fn partial_cmp(&self, other: &SyntaxContext) -> Option<Ordering>
[src]
fn lt(&self, other: &SyntaxContext) -> bool
[src]
fn le(&self, other: &SyntaxContext) -> bool
[src]
fn gt(&self, other: &SyntaxContext) -> bool
[src]
fn ge(&self, other: &SyntaxContext) -> bool
[src]
impl Serialize for SyntaxContext
[src]
impl StructuralEq for SyntaxContext
[src]
impl StructuralPartialEq for SyntaxContext
[src]
Auto Trait Implementations
impl RefUnwindSafe for SyntaxContext
impl Send for SyntaxContext
impl Sync for SyntaxContext
impl Unpin for SyntaxContext
impl UnwindSafe for SyntaxContext
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,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
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.
fn to_owned(&self) -> T
[src]
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.
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>,