Struct rustc_parse_format::FormatSpec
source · 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>
source§fn eq(&self, other: &FormatSpec<'a>) -> bool
fn eq(&self, other: &FormatSpec<'a>) -> bool
self
and other
values to be equal, and is used
by ==
.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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)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