Struct casbin::rhai::VarDefInfo
source · pub struct VarDefInfo<'a> {
pub name: &'a str,
pub is_const: bool,
pub nesting_level: usize,
pub will_shadow: bool,
}
Expand description
Information on a variable declaration.
Fields§
§name: &'a str
VarDefInfo
fields will be private in the next major version. Use name()
instead.Name of the variable to be declared.
§Deprecated API
VarDefInfo
fields will be private in the next major version. Use name()
instead.
is_const: bool
VarDefInfo
fields will be private in the next major version. Use is_const()
instead.true
if the statement is const
, otherwise it is let
.
§Deprecated API
VarDefInfo
fields will be private in the next major version. Use is_const()
instead.
nesting_level: usize
VarDefInfo
fields will be private in the next major version. Use nesting_level()
instead.The current nesting level, with zero being the global level.
§Deprecated API
VarDefInfo
fields will be private in the next major version. Use nesting_level()
instead.
will_shadow: bool
VarDefInfo
fields will be private in the next major version. Use will_shadow_other_variables()
instead.Will the variable shadow an existing variable?
§Deprecated API
VarDefInfo
fields will be private in the next major version. Use will_shadow_other_variables()
instead.
Implementations§
source§impl<'a> VarDefInfo<'a>
impl<'a> VarDefInfo<'a>
sourcepub const fn nesting_level(&self) -> usize
pub const fn nesting_level(&self) -> usize
The current nesting level, with zero being the global level.
sourcepub const fn is_global_level(&self) -> bool
pub const fn is_global_level(&self) -> bool
true
if the variable is declared at global level (i.e. nesting level zero).
sourcepub const fn will_shadow_other_variables(&self) -> bool
pub const fn will_shadow_other_variables(&self) -> bool
Will the variable shadow an existing variable?
Trait Implementations§
source§impl<'a> Clone for VarDefInfo<'a>
impl<'a> Clone for VarDefInfo<'a>
source§fn clone(&self) -> VarDefInfo<'a>
fn clone(&self) -> VarDefInfo<'a>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl<'a> Debug for VarDefInfo<'a>
impl<'a> Debug for VarDefInfo<'a>
Auto Trait Implementations§
impl<'a> Freeze for VarDefInfo<'a>
impl<'a> RefUnwindSafe for VarDefInfo<'a>
impl<'a> Send for VarDefInfo<'a>
impl<'a> Sync for VarDefInfo<'a>
impl<'a> Unpin for VarDefInfo<'a>
impl<'a> UnwindSafe for VarDefInfo<'a>
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)