pub enum TypeContextScope {
InsideFunction,
InsideLoop,
InsideBothFunctionAndLoop,
ArgumentOrOutsideFunction,
}
Variants§
InsideFunction
InsideLoop
InsideBothFunctionAndLoop
Inside both a function and a loop Allows: return, break, and continue
ArgumentOrOutsideFunction
Implementations§
Source§impl TypeContextScope
impl TypeContextScope
Sourcepub fn allows_return(&self) -> bool
pub fn allows_return(&self) -> bool
Returns true if return statements are allowed in this scope
Sourcepub fn allows_break(&self) -> bool
pub fn allows_break(&self) -> bool
Returns true if break statements are allowed in this scope
Sourcepub fn allows_continue(&self) -> bool
pub fn allows_continue(&self) -> bool
Returns true if continue statements are allowed in this scope
Sourcepub fn enter_function(&self) -> Self
pub fn enter_function(&self) -> Self
Creates a new scope when entering a function
Sourcepub fn enter_loop(&self) -> Self
pub fn enter_loop(&self) -> Self
Creates a new scope when entering a loop
Trait Implementations§
Source§impl Clone for TypeContextScope
impl Clone for TypeContextScope
Source§fn clone(&self) -> TypeContextScope
fn clone(&self) -> TypeContextScope
Returns a copy of the value. Read more
1.0.0 · 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 TypeContextScope
impl Debug for TypeContextScope
Source§impl PartialEq for TypeContextScope
impl PartialEq for TypeContextScope
impl Copy for TypeContextScope
impl Eq for TypeContextScope
impl StructuralPartialEq for TypeContextScope
Auto Trait Implementations§
impl Freeze for TypeContextScope
impl RefUnwindSafe for TypeContextScope
impl Send for TypeContextScope
impl Sync for TypeContextScope
impl Unpin for TypeContextScope
impl UnwindSafe for TypeContextScope
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