Struct lexical_parse_float::OptionsBuilder
source · [−]pub struct OptionsBuilder { /* private fields */ }
Expand description
Builder for Options
.
Implementations
sourceimpl OptionsBuilder
impl OptionsBuilder
sourcepub const fn get_lossy(&self) -> bool
pub const fn get_lossy(&self) -> bool
Get if we disable the use of arbitrary-precision arithmetic.
sourcepub const fn get_exponent(&self) -> u8
pub const fn get_exponent(&self) -> u8
Get the character to designate the exponent component of a float.
sourcepub const fn get_decimal_point(&self) -> u8
pub const fn get_decimal_point(&self) -> u8
Get the character to separate the integer from the fraction components.
sourcepub const fn get_nan_string(&self) -> Option<&'static [u8]>
pub const fn get_nan_string(&self) -> Option<&'static [u8]>
Get the string representation for NaN
.
sourcepub const fn get_inf_string(&self) -> Option<&'static [u8]>
pub const fn get_inf_string(&self) -> Option<&'static [u8]>
Get the short string representation for Infinity
.
sourcepub const fn get_infinity_string(&self) -> Option<&'static [u8]>
pub const fn get_infinity_string(&self) -> Option<&'static [u8]>
Get the long string representation for Infinity
.
sourcepub const fn lossy(self, lossy: bool) -> Self
pub const fn lossy(self, lossy: bool) -> Self
Set if we disable the use of arbitrary-precision arithmetic.
sourcepub const fn exponent(self, exponent: u8) -> Self
pub const fn exponent(self, exponent: u8) -> Self
Set the character to designate the exponent component of a float.
sourcepub const fn decimal_point(self, decimal_point: u8) -> Self
pub const fn decimal_point(self, decimal_point: u8) -> Self
Set the character to separate the integer from the fraction components.
sourcepub const fn nan_string(self, nan_string: Option<&'static [u8]>) -> Self
pub const fn nan_string(self, nan_string: Option<&'static [u8]>) -> Self
Set the string representation for NaN
.
sourcepub const fn inf_string(self, inf_string: Option<&'static [u8]>) -> Self
pub const fn inf_string(self, inf_string: Option<&'static [u8]>) -> Self
Set the short string representation for Infinity
.
sourcepub const fn infinity_string(
self,
infinity_string: Option<&'static [u8]>
) -> Self
pub const fn infinity_string(
self,
infinity_string: Option<&'static [u8]>
) -> Self
Set the long string representation for Infinity
.
sourcepub const fn nan_str_is_valid(&self) -> bool
pub const fn nan_str_is_valid(&self) -> bool
Determine if nan_str
is valid.
sourcepub const fn inf_str_is_valid(&self) -> bool
pub const fn inf_str_is_valid(&self) -> bool
Determine if inf_str
is valid.
sourcepub const fn infinity_string_is_valid(&self) -> bool
pub const fn infinity_string_is_valid(&self) -> bool
Determine if infinity_string
is valid.
sourcepub const unsafe fn build_unchecked(&self) -> Options
pub const unsafe fn build_unchecked(&self) -> Options
Build the Options struct without validation.
Safety
Always safe, just marked as unsafe for API compatibility.
The result may be invalid if is_valid
is not true.
Trait Implementations
sourceimpl Clone for OptionsBuilder
impl Clone for OptionsBuilder
sourcefn clone(&self) -> OptionsBuilder
fn clone(&self) -> OptionsBuilder
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for OptionsBuilder
impl Debug for OptionsBuilder
sourceimpl Default for OptionsBuilder
impl Default for OptionsBuilder
sourceimpl Ord for OptionsBuilder
impl Ord for OptionsBuilder
sourceimpl PartialEq<OptionsBuilder> for OptionsBuilder
impl PartialEq<OptionsBuilder> for OptionsBuilder
sourcefn eq(&self, other: &OptionsBuilder) -> bool
fn eq(&self, other: &OptionsBuilder) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &OptionsBuilder) -> bool
fn ne(&self, other: &OptionsBuilder) -> bool
This method tests for !=
.
sourceimpl PartialOrd<OptionsBuilder> for OptionsBuilder
impl PartialOrd<OptionsBuilder> for OptionsBuilder
sourcefn partial_cmp(&self, other: &OptionsBuilder) -> Option<Ordering>
fn partial_cmp(&self, other: &OptionsBuilder) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl Eq for OptionsBuilder
impl StructuralEq for OptionsBuilder
impl StructuralPartialEq for OptionsBuilder
Auto Trait Implementations
impl RefUnwindSafe for OptionsBuilder
impl Send for OptionsBuilder
impl Sync for OptionsBuilder
impl Unpin for OptionsBuilder
impl UnwindSafe for OptionsBuilder
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more