pub struct ScopeTracker { /* private fields */ }Expand description
Scope tracker for variable declarations
Implementations§
Source§impl ScopeTracker
impl ScopeTracker
pub fn new() -> Self
pub fn enter_scope(&mut self)
pub fn exit_scope(&mut self)
pub fn declare(&mut self, name: &str)
pub fn is_declared(&self, name: &str) -> bool
pub fn is_declared_in_current_scope(&self, name: &str) -> bool
pub fn depth(&self) -> usize
Trait Implementations§
Source§impl Debug for ScopeTracker
impl Debug for ScopeTracker
Source§impl Default for ScopeTracker
impl Default for ScopeTracker
Source§fn default() -> ScopeTracker
fn default() -> ScopeTracker
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ScopeTracker
impl RefUnwindSafe for ScopeTracker
impl Send for ScopeTracker
impl Sync for ScopeTracker
impl Unpin for ScopeTracker
impl UnwindSafe for ScopeTracker
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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