pub struct GmpConversionSpec {}Expand description
A single parsed printf-style conversion specification, as GMP’s and MPFR’s formatted-output
functions understand them: % [flags] [width] [.precision] [type] [rounding] conv.
The struct is purely syntactic: it records what was written, and each GmpFormatArg
implementation applies its own library’s interpretation. In particular:
signis the last+or space flag written (or 0 for neither), which is what GMP’s own types use, whileplusandspacerecord whether each flag appeared at all, which is what the C conversions need (+overrides space in C, regardless of order).precisNonewhen no precision was written, andSome(-1)for a.with no digits, which GMP reads as “all necessary digits” and C and MPFR read as 0.type_chris the type or length-modifier character (Z,Q,R,l,h, and so on, or 0 for none), withtype_doubleddistinguishinghhandll. As in GMP’s parser, a later type character overwrites an earlier one.rnd_chris MPFR’s rounding character, only ever set directly after anR.
Fields§
§sign: u8§plus: bool§space: bool§alt: bool§left: bool§group: bool§fill: u8§width: i64§prec: Option<i64>§type_chr: u8§type_doubled: bool§rnd_chr: u8§conv: u8Trait Implementations§
Source§impl Clone for GmpConversionSpec
impl Clone for GmpConversionSpec
Source§fn clone(&self) -> GmpConversionSpec
fn clone(&self) -> GmpConversionSpec
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 GmpConversionSpec
Source§impl Debug for GmpConversionSpec
impl Debug for GmpConversionSpec
impl Eq for GmpConversionSpec
Source§impl PartialEq for GmpConversionSpec
impl PartialEq for GmpConversionSpec
impl StructuralPartialEq for GmpConversionSpec
Auto Trait Implementations§
impl Freeze for GmpConversionSpec
impl RefUnwindSafe for GmpConversionSpec
impl Send for GmpConversionSpec
impl Sync for GmpConversionSpec
impl Unpin for GmpConversionSpec
impl UnsafeUnpin for GmpConversionSpec
impl UnwindSafe for GmpConversionSpec
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more