pub struct Format { /* private fields */ }
Expand description
Same as fmt::Formatter, but allowing to change flags so we can reuse it in recursive format implementations
Implementations§
source§impl Format
impl Format
pub const fn empty() -> Self
pub fn new(formatter: &Formatter<'_>) -> Self
pub const fn fill(&self) -> char
pub const fn cloned_align(&self) -> Option<Alignment>
pub const fn align(&self) -> &Option<Alignment>
pub const fn set_align(self, align: Option<Alignment>) -> Self
pub const fn width(&self) -> &Option<usize>
pub const fn set_width(self, width: Option<usize>) -> Self
pub const fn precision(&self) -> &Option<usize>
pub const fn set_precision(self, precision: Option<usize>) -> Self
pub const fn sign_plus(&self) -> bool
pub const fn set_sign_plus(self, flag: bool) -> Self
pub const fn sign_minus(&self) -> bool
pub const fn set_sign_minus(self, flag: bool) -> Self
pub const fn alternate(&self) -> bool
pub const fn set_alternate(self, flag: bool) -> Self
pub const fn sign_aware_zero_pad(&self) -> bool
pub const fn set_sign_aware_zero_pad(self, flag: bool) -> Self
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Format
impl RefUnwindSafe for Format
impl Send for Format
impl Sync for Format
impl Unpin for Format
impl UnwindSafe for Format
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)