pub struct Scientific<T: FixedValue> { /* private fields */ }Expand description
A type-preserving adapter for C printf scientific formatting.
Implementations§
Source§impl<T: FixedValue> Scientific<T>
impl<T: FixedValue> Scientific<T>
Sourcepub fn space_sign(self) -> Self
pub fn space_sign(self) -> Self
Requests C’s space-sign flag for a nonnegative value.
A Rust + formatting flag overrides the space. For example,
format!("{:e}", scientific(1.25_f32).space_sign()) is equivalent to
printf("% e", (double)1.25f), while formatting the same wrapper with
{:+e} is equivalent to printf("%+ e", (double)1.25f).
Trait Implementations§
Source§impl<T: Clone + FixedValue> Clone for Scientific<T>
impl<T: Clone + FixedValue> Clone for Scientific<T>
impl<T: Copy + FixedValue> Copy for Scientific<T>
Source§impl<T: FixedValue> LowerExp for Scientific<T>
impl<T: FixedValue> LowerExp for Scientific<T>
Auto Trait Implementations§
impl<T> Forget for Scientific<T>
impl<T> Freeze for Scientific<T>where
T: Freeze,
impl<T> RefUnwindSafe for Scientific<T>where
T: RefUnwindSafe,
impl<T> Send for Scientific<T>where
T: Send,
impl<T> Sync for Scientific<T>where
T: Sync,
impl<T> Unpin for Scientific<T>where
T: Unpin,
impl<T> UnsafeUnpin for Scientific<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for Scientific<T>where
T: UnwindSafe,
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