pub enum Count<'a> {
CountIs(usize),
CountIsName(&'a str, InnerSpan),
CountIsParam(usize),
CountIsStar(usize),
CountImplied,
}
Expand description
A count is used for the precision and width parameters of an integer, and can reference either an argument or a literal integer.
Variants§
CountIs(usize)
The count is specified explicitly.
CountIsName(&'a str, InnerSpan)
The count is specified by the argument with the given name.
CountIsParam(usize)
The count is specified by the argument at the given index.
CountIsStar(usize)
The count is specified by a star (like in {:.*}
) that refers to the argument at the given index.
CountImplied
The count is implied and cannot be explicitly specified.
Trait Implementations§
impl<'a> Copy for Count<'a>
impl<'a> StructuralPartialEq for Count<'a>
Auto Trait Implementations§
impl<'a> Freeze for Count<'a>
impl<'a> RefUnwindSafe for Count<'a>
impl<'a> Send for Count<'a>
impl<'a> Sync for Count<'a>
impl<'a> Unpin for Count<'a>
impl<'a> UnwindSafe for Count<'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
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>
Converts
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>
Converts
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: 40 bytes
Size for each variant:
CountIs
: 8 bytesCountIsName
: 32 bytesCountIsParam
: 8 bytesCountIsStar
: 8 bytesCountImplied
: 0 bytes