Struct rustc_parse_format::FormatSpec
source · 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).
Trait Implementations
sourceimpl<'a> Clone for FormatSpec<'a>
impl<'a> Clone for FormatSpec<'a>
sourcefn clone(&self) -> FormatSpec<'a>
fn clone(&self) -> FormatSpec<'a>
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresourceimpl<'a> Debug for FormatSpec<'a>
impl<'a> Debug for FormatSpec<'a>
sourceimpl<'a> PartialEq<FormatSpec<'a>> for FormatSpec<'a>
impl<'a> PartialEq<FormatSpec<'a>> for FormatSpec<'a>
sourcefn eq(&self, other: &FormatSpec<'a>) -> bool
fn eq(&self, other: &FormatSpec<'a>) -> bool
impl<'a> Copy for FormatSpec<'a>
impl<'a> StructuralPartialEq for FormatSpec<'a>
Auto Trait Implementations
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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Layout
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.
Size: 184 bytes