#[non_exhaustive]pub struct ParseOptions {
pub on_malformed_record: OnMalformed,
}Expand description
Malformed-record policy, re-exported so consumers need not depend on
openbim-step directly to configure a reader.
Parse behavior toggles.
Constructed with ParseOptions::default (strict) and adjusted through
ParseOptions::on_malformed_record, so later options cannot break
existing call sites.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.on_malformed_record: OnMalformedPolicy for unparsable data records.
Implementations§
Source§impl ParseOptions
impl ParseOptions
Sourcepub const fn strict() -> ParseOptions
pub const fn strict() -> ParseOptions
Strict options: any malformed record aborts the parse.
Sourcepub const fn lenient() -> ParseOptions
pub const fn lenient() -> ParseOptions
Options that skip and report malformed data records.
Sourcepub const fn on_malformed_record(self, policy: OnMalformed) -> ParseOptions
pub const fn on_malformed_record(self, policy: OnMalformed) -> ParseOptions
Sets the malformed-record policy.
Trait Implementations§
Source§impl Clone for ParseOptions
impl Clone for ParseOptions
Source§fn clone(&self) -> ParseOptions
fn clone(&self) -> ParseOptions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ParseOptions
Source§impl Debug for ParseOptions
impl Debug for ParseOptions
Source§impl Default for ParseOptions
impl Default for ParseOptions
Source§fn default() -> ParseOptions
fn default() -> ParseOptions
Returns the “default value” for a type. Read more
impl Eq for ParseOptions
Source§impl Hash for ParseOptions
impl Hash for ParseOptions
Source§impl PartialEq for ParseOptions
impl PartialEq for ParseOptions
impl StructuralPartialEq for ParseOptions
Auto Trait Implementations§
impl Freeze for ParseOptions
impl RefUnwindSafe for ParseOptions
impl Send for ParseOptions
impl Sync for ParseOptions
impl Unpin for ParseOptions
impl UnsafeUnpin for ParseOptions
impl UnwindSafe for ParseOptions
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