pub struct ValueState {
pub def: ValueDef,
pub index: usize,
/* private fields */
}Expand description
Runtime state for a single value.
Fields§
§def: ValueDefDefinition from template.
index: usizeIndex of this value in the record.
Implementations§
Source§impl ValueState
impl ValueState
Sourcepub fn new(def: ValueDef, index: usize) -> ValueState
pub fn new(def: ValueDef, index: usize) -> ValueState
Create a new value state.
Sourcepub fn assign(&mut self, value: String, all_results: &mut [Vec<Value>])
pub fn assign(&mut self, value: String, all_results: &mut [Vec<Value>])
Assign a matched value.
Sourcepub fn satisfies_required(&self) -> bool
pub fn satisfies_required(&self) -> bool
Check if Required constraint is satisfied.
Sourcepub fn take_for_record(&mut self) -> Value
pub fn take_for_record(&mut self) -> Value
Get current value for recording.
Trait Implementations§
Source§impl Clone for ValueState
impl Clone for ValueState
Source§fn clone(&self) -> ValueState
fn clone(&self) -> ValueState
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 moreAuto Trait Implementations§
impl Freeze for ValueState
impl RefUnwindSafe for ValueState
impl Send for ValueState
impl Sync for ValueState
impl Unpin for ValueState
impl UnwindSafe for ValueState
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