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>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for 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: 208 bytes