pub enum EntryMut<'a> {
Expr(&'a mut Expr),
Value(&'a mut Value),
}Expand description
A mutable reference to either an Expr or a Value within a
composite structure.
This is the mutable counterpart to Entry, used for
in-place modification of nested expressions or values.
§Examples
ⓘ
use toasty_core::stmt::{EntryMut, Expr, Value};
let mut expr = Expr::from(Value::from(42_i64));
let mut entry = EntryMut::from(&mut expr);
assert!(matches!(entry, EntryMut::Expr(_)));Variants§
Expr(&'a mut Expr)
A mutable reference to an expression.
Value(&'a mut Value)
A mutable reference to a value.
Implementations§
Source§impl EntryMut<'_>
impl EntryMut<'_>
Sourcepub fn is_value_null(&self) -> bool
pub fn is_value_null(&self) -> bool
Returns true if this entry holds a null value.
Sourcepub fn is_record(&self) -> bool
pub fn is_record(&self) -> bool
Returns true if this entry holds a record, either as an
Expr::Record, an Expr::Value(Value::Record), or a bare
Value::Record.
Sourcepub fn is_default(&self) -> bool
pub fn is_default(&self) -> bool
Returns true if this entry is Expr::Default.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for EntryMut<'a>
impl<'a> RefUnwindSafe for EntryMut<'a>
impl<'a> Send for EntryMut<'a>
impl<'a> Sync for EntryMut<'a>
impl<'a> Unpin for EntryMut<'a>
impl<'a> UnsafeUnpin for EntryMut<'a>
impl<'a> !UnwindSafe for EntryMut<'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