Struct edres::ParseOptions
source · [−]pub struct ParseOptions {
pub default_float_size: FloatSize,
pub default_int_size: IntSize,
pub max_array_size: Option<usize>,
}
Expand description
Options specific to how edres
should parse markup.
Fields
default_float_size: FloatSize
The floating point type to infer from input.
This can be either f32
or f64
. Values that are too
large to fit the chosen default will instead be inferred
as a larger type.
default_int_size: IntSize
The integer type to infer from input.
This can be anything from i8
to i128
, including
isize
. Values that are too large to fit the chosen
default will instead be inferred as a larger type.
max_array_size: Option<usize>
What size of sequence, if any, to consider small enough
to use an array instead of a Vec
.
For example, if Some(4)
is provided, then sequences of
more than 4 items in the input will generate a Vec
in
the resulting struct. Meanwhile, a sequence of 4 values
would instead generate a [T; 4]
.
Implementations
sourceimpl ParseOptions
impl ParseOptions
sourcepub const fn new() -> ParseOptions
pub const fn new() -> ParseOptions
Examples
assert_eq!(ParseOptions::new(), ParseOptions {
default_float_size: FloatSize::F64,
default_int_size: IntSize::I64,
max_array_size: None,
});
Trait Implementations
sourceimpl Clone for ParseOptions
impl Clone for ParseOptions
sourcefn clone(&self) -> ParseOptions
fn clone(&self) -> ParseOptions
Returns a copy of the value. Read more
1.0.0 · sourceconst fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for ParseOptions
impl Debug for ParseOptions
sourceimpl Default for ParseOptions
impl Default for ParseOptions
sourcefn default() -> ParseOptions
fn default() -> ParseOptions
Examples
assert_eq!(ParseOptions::default(), ParseOptions::new());
sourceimpl PartialEq<ParseOptions> for ParseOptions
impl PartialEq<ParseOptions> for ParseOptions
sourcefn eq(&self, other: &ParseOptions) -> bool
fn eq(&self, other: &ParseOptions) -> bool
impl Eq for ParseOptions
impl StructuralEq for ParseOptions
impl StructuralPartialEq for ParseOptions
Auto Trait Implementations
impl RefUnwindSafe for ParseOptions
impl Send for ParseOptions
impl Sync for ParseOptions
impl Unpin for ParseOptions
impl UnwindSafe for ParseOptions
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.