pub struct FormatSpec<'a> {
pub fill: Option<char>,
pub align: Alignment,
pub flags: u32,
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.
align: Alignment
Optionally specified alignment.
flags: u32
Packed version of various flags provided.
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).
Implementations§
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 duplicate 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> Default for FormatSpec<'a>
impl<'a> Default for FormatSpec<'a>
Source§impl<'a> Display for FormatSpec<'a>
impl<'a> Display for FormatSpec<'a>
Source§impl<'a> PartialEq for FormatSpec<'a>
impl<'a> PartialEq for FormatSpec<'a>
impl<'a> Copy for FormatSpec<'a>
impl<'a> Eq 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