pub struct EarlierAnswers<'a> { /* private fields */ }Expand description
A read-only view of the answers decoded before the current field in
the same scope chain, handed to a
DynamicDefault closure.
Lookups take a stable definition ID (command.inputs.value_type) and
resolve it against the walk’s open scope chain, exactly like a condition
controller: a field inside a repeatable group resolves to the occurrence
currently being collected. The view is deliberately forgiving where
construction cannot check the closure’s dependencies: an unknown,
out-of-scope, later-declared (not yet walked), omitted, inactive, or
errored field reads as None — depending on such a field is a contract
violation, and the closure must still return a usable default.
Implementations§
Source§impl<'a> EarlierAnswers<'a>
impl<'a> EarlierAnswers<'a>
Sourcepub fn get(&self, field_id: &str) -> Option<&AnswerValue>
pub fn get(&self, field_id: &str) -> Option<&AnswerValue>
The decoded value of the earlier field with the given stable
definition ID, resolved in the current scope chain, or None when
the field has no decoded value (see the type-level contract).
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for EarlierAnswers<'a>
impl<'a> !UnwindSafe for EarlierAnswers<'a>
impl<'a> Freeze for EarlierAnswers<'a>
impl<'a> Send for EarlierAnswers<'a>
impl<'a> Sync for EarlierAnswers<'a>
impl<'a> Unpin for EarlierAnswers<'a>
impl<'a> UnsafeUnpin for EarlierAnswers<'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
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> ⓘ
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> ⓘ
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