pub struct ScopeDepth(/* private fields */);Implementations§
Source§impl ScopeDepth
impl ScopeDepth
pub fn new(depth: usize) -> Self
pub fn as_usize(&self) -> usize
pub fn is_zero(&self) -> bool
pub fn is_positive(&self) -> bool
pub fn increment(&mut self)
pub fn decrement(&mut self)
pub fn add(&self, other: ScopeDepth) -> Self
pub fn sub(&self, other: ScopeDepth) -> Self
Trait Implementations§
Source§impl Add for ScopeDepth
impl Add for ScopeDepth
Source§impl Clone for ScopeDepth
impl Clone for ScopeDepth
Source§fn clone(&self) -> ScopeDepth
fn clone(&self) -> ScopeDepth
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 ScopeDepth
impl Debug for ScopeDepth
Source§impl<'de> Deserialize<'de> for ScopeDepth
impl<'de> Deserialize<'de> for ScopeDepth
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for ScopeDepth
impl Display for ScopeDepth
Source§impl From<ScopeDepth> for usize
impl From<ScopeDepth> for usize
Source§fn from(depth: ScopeDepth) -> Self
fn from(depth: ScopeDepth) -> Self
Converts to this type from the input type.
Source§impl From<usize> for ScopeDepth
impl From<usize> for ScopeDepth
Source§impl Hash for ScopeDepth
impl Hash for ScopeDepth
Source§impl PartialEq for ScopeDepth
impl PartialEq for ScopeDepth
Source§impl Serialize for ScopeDepth
impl Serialize for ScopeDepth
Source§impl Sub for ScopeDepth
impl Sub for ScopeDepth
impl Copy for ScopeDepth
impl Eq for ScopeDepth
impl StructuralPartialEq for ScopeDepth
Auto Trait Implementations§
impl Freeze for ScopeDepth
impl RefUnwindSafe for ScopeDepth
impl Send for ScopeDepth
impl Sync for ScopeDepth
impl Unpin for ScopeDepth
impl UnwindSafe for ScopeDepth
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