pub struct Signed<T: SignedValue> { /* private fields */ }Expand description
A type-preserving adapter for C printf signed-integer formatting.
Implementations§
Source§impl<T: SignedValue> Signed<T>
impl<T: SignedValue> Signed<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!("{}", signed(7_i8).space_sign()) is equivalent to
printf("% hhd", 7), while formatting the same wrapper with {:+} is
equivalent to printf("%+ hhd", 7).
Trait Implementations§
impl<T: Copy + SignedValue> Copy for Signed<T>
Auto Trait Implementations§
impl<T> Forget for Signed<T>
impl<T> Freeze for Signed<T>where
T: Freeze,
impl<T> RefUnwindSafe for Signed<T>where
T: RefUnwindSafe,
impl<T> Send for Signed<T>where
T: Send,
impl<T> Sync for Signed<T>where
T: Sync,
impl<T> Unpin for Signed<T>where
T: Unpin,
impl<T> UnsafeUnpin for Signed<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for Signed<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