pub enum Style {
None,
Octal,
Hex,
UpperHex,
Exponential,
UpperExponential,
Pointer,
Debug,
HexDebug,
UpperHexDebug,
Binary,
}
Expand description
The abstract formatting style for a conversion.
Variants§
None
No style specified, use defaults.
Octal
Octal rendering (i.e. “%o” or “{:o}”).
Hex
Hexadecimal rendering (i.e. “%x” or “{:x}”).
UpperHex
Upper case hexadecimal rendering (i.e. “%X” or “{:X}”).
Exponential
Exponential rendering (i.e. “%e” or “{:e}”.
UpperExponential
Upper case exponential rendering (i.e. “%E” or “{:E}”.
Pointer
Pointer type rendering (i.e. “%p” or “{:p}”).
Debug
core::fmt
’s {:?}
HexDebug
core::fmt
’s {:x?}
UpperHexDebug
core::fmt
’s {:X?}
Binary
Unsupported binary rendering
This variant exists so that the proc macros can give useful error messages.
Trait Implementations§
source§impl PartialEq for Style
impl PartialEq for Style
source§impl ToTokens for Style
impl ToTokens for Style
Implemented for testing through the pw_format_test_macros crate.
source§fn to_tokens(&self, tokens: &mut TokenStream)
fn to_tokens(&self, tokens: &mut TokenStream)
source§fn to_token_stream(&self) -> TokenStream
fn to_token_stream(&self) -> TokenStream
source§fn into_token_stream(self) -> TokenStreamwhere
Self: Sized,
fn into_token_stream(self) -> TokenStreamwhere
Self: Sized,
impl Copy for Style
impl Eq for Style
impl StructuralPartialEq for Style
Auto Trait Implementations§
impl RefUnwindSafe for Style
impl Send for Style
impl Sync for Style
impl Unpin for Style
impl UnwindSafe for Style
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> Spanned for Twhere
T: Spanned + ?Sized,
impl<T> Spanned for Twhere
T: Spanned + ?Sized,
source§fn span(&self) -> Span
fn span(&self) -> Span
Returns a
Span
covering the complete contents of this syntax tree
node, or Span::call_site()
if this node is empty.