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: FloatSizeThe 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: IntSizeThe 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§
Source§impl 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§
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 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ParseOptions
impl Debug for ParseOptions
Source§impl Default for ParseOptions
impl Default for ParseOptions
Source§fn default() -> ParseOptions
fn default() -> ParseOptions
§Examples
assert_eq!(ParseOptions::default(), ParseOptions::new());Source§impl PartialEq for ParseOptions
impl PartialEq for ParseOptions
impl Eq 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 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.