pub struct FormatOptionsBuilder(/* private fields */);Expand description
Helper struct to build a FormatOptions struct.
Implementations§
Source§impl FormatOptionsBuilder
impl FormatOptionsBuilder
Sourcepub fn number(self, number: NumberFormat) -> Self
pub fn number(self, number: NumberFormat) -> Self
Sets the number format. See NumberFormat for more information.
Sourcepub fn scientific(self, scientific: Scientific) -> Self
pub fn scientific(self, scientific: Scientific) -> Self
Sets the scientific notation suffix. See Scientific for more information.
Sourcepub fn precision(self, precision: Option<usize>) -> Self
pub fn precision(self, precision: Option<usize>) -> Self
Sets the maximum number of digits to show. If None, the number is formatted with full
precision. See FormatOptions::precision for more information.
Sourcepub fn separators(self, separators: Separator) -> Self
pub fn separators(self, separators: Separator) -> Self
Sets whether to display separators for large numbers. See Separator for more
information.
Sourcepub fn show_refs(self, show_refs: ShowRefs) -> Self
pub fn show_refs(self, show_refs: ShowRefs) -> Self
Sets whether to print addresses of reference types, such as lists. See ShowRefs for
more information.
Sourcepub fn build(self) -> FormatOptions
pub fn build(self) -> FormatOptions
Builds the FormatOptions struct.
Trait Implementations§
Source§impl Clone for FormatOptionsBuilder
impl Clone for FormatOptionsBuilder
Source§fn clone(&self) -> FormatOptionsBuilder
fn clone(&self) -> FormatOptionsBuilder
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 FormatOptionsBuilder
impl Debug for FormatOptionsBuilder
Source§impl Default for FormatOptionsBuilder
impl Default for FormatOptionsBuilder
Source§fn default() -> FormatOptionsBuilder
fn default() -> FormatOptionsBuilder
Returns the “default value” for a type. Read more
Source§impl PartialEq for FormatOptionsBuilder
impl PartialEq for FormatOptionsBuilder
impl Copy for FormatOptionsBuilder
impl StructuralPartialEq for FormatOptionsBuilder
Auto Trait Implementations§
impl Freeze for FormatOptionsBuilder
impl RefUnwindSafe for FormatOptionsBuilder
impl Send for FormatOptionsBuilder
impl Sync for FormatOptionsBuilder
impl Unpin for FormatOptionsBuilder
impl UnwindSafe for FormatOptionsBuilder
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> CheckedAs for T
impl<T> CheckedAs for T
Source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Casts the value.
Source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
Source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Casts the value.
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> OverflowingAs for T
impl<T> OverflowingAs for T
Source§fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
Source§fn overflowing_cast_from(src: Src) -> (Dst, bool)
fn overflowing_cast_from(src: Src) -> (Dst, bool)
Casts the value.
Source§impl<T> SaturatingAs for T
impl<T> SaturatingAs for T
Source§fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
Source§fn saturating_cast_from(src: Src) -> Dst
fn saturating_cast_from(src: Src) -> Dst
Casts the value.
Source§impl<T> UnwrappedAs for T
impl<T> UnwrappedAs for T
Source§fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
Casts the value.
Source§impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
Source§fn unwrapped_cast_from(src: Src) -> Dst
fn unwrapped_cast_from(src: Src) -> Dst
Casts the value.
Source§impl<T> WrappingAs for T
impl<T> WrappingAs for T
Source§fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
Source§fn wrapping_cast_from(src: Src) -> Dst
fn wrapping_cast_from(src: Src) -> Dst
Casts the value.