pub struct DepthDomain {
pub max_depth: usize,
pub current_depth: usize,
}Expand description
Abstract domain for expression depth analysis.
Fields§
§max_depth: usizeMaximum allowed depth.
current_depth: usizeCurrent depth reached.
Implementations§
Source§impl DepthDomain
impl DepthDomain
Sourcepub fn is_bounded(&self) -> bool
pub fn is_bounded(&self) -> bool
True if the current depth is within bounds.
Sourcepub fn increase(&self) -> DepthDomain
pub fn increase(&self) -> DepthDomain
Increase depth by one, saturating at max_depth + 1.
Sourcepub fn join(&self, other: &DepthDomain) -> DepthDomain
pub fn join(&self, other: &DepthDomain) -> DepthDomain
Join (take the maximum current depth) with another DepthDomain.
Trait Implementations§
Source§impl Clone for DepthDomain
impl Clone for DepthDomain
Source§fn clone(&self) -> DepthDomain
fn clone(&self) -> DepthDomain
Returns a duplicate 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 DepthDomain
impl Debug for DepthDomain
Source§impl PartialEq for DepthDomain
impl PartialEq for DepthDomain
impl Copy for DepthDomain
impl Eq for DepthDomain
impl StructuralPartialEq for DepthDomain
Auto Trait Implementations§
impl Freeze for DepthDomain
impl RefUnwindSafe for DepthDomain
impl Send for DepthDomain
impl Sync for DepthDomain
impl Unpin for DepthDomain
impl UnsafeUnpin for DepthDomain
impl UnwindSafe for DepthDomain
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