pub struct ExprArenaSnapshot<'a> { /* private fields */ }Expand description
Immutable copy-on-write snapshot of an ExprArenaCell.
Methods from Deref<Target = ExprArena>§
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn get(&self, id: ExprId) -> &ExprNode
pub fn nodes(&self) -> &[ExprNode]
pub fn num_params(&self) -> usize
Sourcepub fn param_value(&self, p: ParamId) -> f64
pub fn param_value(&self, p: ParamId) -> f64
Current value bound to parameter p.
§Panics
Panics if p was not allocated by Self::new_param on this arena.
Sourcepub fn try_param_value(&self, p: ParamId) -> Option<f64>
pub fn try_param_value(&self, p: ParamId) -> Option<f64>
Look up the value of p, returning None if p is out of range.
Trait Implementations§
Source§impl Debug for ExprArenaSnapshot<'_>
impl Debug for ExprArenaSnapshot<'_>
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for ExprArenaSnapshot<'a>
impl<'a> !UnwindSafe for ExprArenaSnapshot<'a>
impl<'a> Freeze for ExprArenaSnapshot<'a>
impl<'a> Send for ExprArenaSnapshot<'a>
impl<'a> Sync for ExprArenaSnapshot<'a>
impl<'a> Unpin for ExprArenaSnapshot<'a>
impl<'a> UnsafeUnpin for ExprArenaSnapshot<'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
Mutably borrows from an owned value. Read more
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