pub struct FormatSpec<'a> {Show 13 fields
pub fill: Option<char>,
pub fill_span: Option<InnerSpan>,
pub align: Alignment,
pub sign: Option<Sign>,
pub alternate: bool,
pub zero_pad: bool,
pub debug_hex: Option<DebugHex>,
pub precision: Count<'a>,
pub precision_span: Option<InnerSpan>,
pub width: Count<'a>,
pub width_span: Option<InnerSpan>,
pub ty: &'a str,
pub ty_span: Option<InnerSpan>,
}
Expand description
Specification for the formatting of an argument in the format string.
Fields§
§fill: Option<char>
Optionally specified character to fill alignment with.
fill_span: Option<InnerSpan>
Span of the optionally specified fill character.
align: Alignment
Optionally specified alignment.
sign: Option<Sign>
The +
or -
flag.
alternate: bool
The #
flag.
zero_pad: bool
The 0
flag.
debug_hex: Option<DebugHex>
The x
or X
flag. (Only for Debug
.)
precision: Count<'a>
The integer precision to use.
precision_span: Option<InnerSpan>
The span of the precision formatting flag (for diagnostics).
width: Count<'a>
The string width requested for the resulting format.
width_span: Option<InnerSpan>
The span of the width formatting flag (for diagnostics).
ty: &'a str
The descriptor string representing the name of the format desired for this argument, this can be empty or any number of characters, although it is required to be one word.
ty_span: Option<InnerSpan>
The span of the descriptor string (for diagnostics).
Trait Implementations§
Source§impl<'a> Clone for FormatSpec<'a>
impl<'a> Clone for FormatSpec<'a>
Source§fn clone(&self) -> FormatSpec<'a>
fn clone(&self) -> FormatSpec<'a>
Returns a copy 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<'a> Debug for FormatSpec<'a>
impl<'a> Debug for FormatSpec<'a>
Source§impl<'a> PartialEq for FormatSpec<'a>
impl<'a> PartialEq for FormatSpec<'a>
impl<'a> Copy for FormatSpec<'a>
impl<'a> StructuralPartialEq for FormatSpec<'a>
Auto Trait Implementations§
impl<'a> Freeze for FormatSpec<'a>
impl<'a> RefUnwindSafe for FormatSpec<'a>
impl<'a> Send for FormatSpec<'a>
impl<'a> Sync for FormatSpec<'a>
impl<'a> Unpin for FormatSpec<'a>
impl<'a> UnwindSafe for FormatSpec<'a>
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