pub struct RawAnswers { /* private fields */ }Expand description
The raw answers parsed from one answer sheet.
Values are keyed by occurrence path — the stable field ID, with a
zero-based index inserted for every enclosing repeatable-group occurrence
(command.inputs[1].name) — and hold the verbatim answer text with outer
whitespace trimmed and internal line breaks preserved. A field absent
from the document is absent here; a field whose answer area was left
blank is present with an empty string. Occurrence counts of repeatable
groups are carried alongside (occurrence_count),
as are any warning-level diagnostics (warnings).
Decoding raw text into typed values (defaults, omission, validation) is a
later stage, shared with interactive collection.
Implementations§
Source§impl RawAnswers
impl RawAnswers
Sourcepub fn get(&self, path: &str) -> Option<&str>
pub fn get(&self, path: &str) -> Option<&str>
The raw answer text at an occurrence path (for fields outside repeatable groups: the stable field ID), if it appeared.
Sourcepub fn occurrence_count(&self, group_path: &str) -> usize
pub fn occurrence_count(&self, group_path: &str) -> usize
How many occurrences of a repeatable group appeared, addressed by the
group’s occurrence path base — command.inputs at the root,
command.inputs[0].flags for a group nested in another occurrence.
Sourcepub fn warnings(&self) -> &[AnswerSheetDiagnostic]
pub fn warnings(&self) -> &[AnswerSheetDiagnostic]
Warning-level diagnostics from parsing: problems worth showing the
user that do not invalidate the submission. Currently
AnswerSheetDiagnostic::SuspectedTagInAnswer, raised when accepted
answer text contains <id: anywhere — a mid-line tag mention, a
mangled tag, or a half-deleted one. Empty for interactive collection.
Trait Implementations§
Source§impl Clone for RawAnswers
impl Clone for RawAnswers
Source§fn clone(&self) -> RawAnswers
fn clone(&self) -> RawAnswers
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RawAnswers
impl Debug for RawAnswers
Source§impl Default for RawAnswers
impl Default for RawAnswers
Source§fn default() -> RawAnswers
fn default() -> RawAnswers
impl Eq for RawAnswers
Source§impl PartialEq for RawAnswers
impl PartialEq for RawAnswers
impl StructuralPartialEq for RawAnswers
Auto Trait Implementations§
impl Freeze for RawAnswers
impl RefUnwindSafe for RawAnswers
impl Send for RawAnswers
impl Sync for RawAnswers
impl Unpin for RawAnswers
impl UnsafeUnpin for RawAnswers
impl UnwindSafe for RawAnswers
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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