pub struct Scan<'a> { /* private fields */ }Expand description
A data section indexed by scan: the parsed header and an iterator
over the framed data records.
Implementations§
Source§impl<'a> Scan<'a>
impl<'a> Scan<'a>
Sourcepub const fn header(&self) -> &HeaderSection
pub const fn header(&self) -> &HeaderSection
The parsed header section.
Sourcepub fn records(&self) -> Records<'a> ⓘ
pub fn records(&self) -> Records<'a> ⓘ
Iterates over the data records in source order. After the last
record the iterator checks ENDSEC; and the end marker; a defect
anywhere is yielded as an error, after which the iterator ends.
Sourcepub fn decode(
&self,
record: &ScannedRecord<'_>,
) -> Result<DataRecord, StepError>
pub fn decode( &self, record: &ScannedRecord<'_>, ) -> Result<DataRecord, StepError>
Sourcepub fn decode_with(
&self,
record: &ScannedRecord<'_>,
options: ParseOptions,
) -> Result<(DataRecord, Vec<Diagnostic>), StepError>
pub fn decode_with( &self, record: &ScannedRecord<'_>, options: ParseOptions, ) -> Result<(DataRecord, Vec<Diagnostic>), StepError>
Self::decode under options, as parse_with
reads the record, with the record’s diagnostics.
§Errors
Returns the syntax error inside the record, if any.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Scan<'a>
impl<'a> RefUnwindSafe for Scan<'a>
impl<'a> Send for Scan<'a>
impl<'a> Sync for Scan<'a>
impl<'a> Unpin for Scan<'a>
impl<'a> UnsafeUnpin for Scan<'a>
impl<'a> UnwindSafe for Scan<'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