Struct pw_format::macros::FormatParams
source · pub struct FormatParams {
pub style: Style,
pub min_field_width: Option<u32>,
pub zero_padding: bool,
}
Expand description
Formatting parameters passed to an untyped conversion.
Fields§
§style: Style
Style in which to print the corresponding argument.
min_field_width: Option<u32>
Minimum field width. (i.e. the 8
in {:08x}
).
zero_padding: bool
Zero padding. (i.e. the existence of 0
in {:08x}
).
Trait Implementations§
source§impl Clone for FormatParams
impl Clone for FormatParams
source§fn clone(&self) -> FormatParams
fn clone(&self) -> FormatParams
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for FormatParams
impl Debug for FormatParams
source§impl PartialEq for FormatParams
impl PartialEq for FormatParams
source§fn eq(&self, other: &FormatParams) -> bool
fn eq(&self, other: &FormatParams) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl ToTokens for FormatParams
impl ToTokens for FormatParams
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,
source§impl TryFrom<&ConversionSpec> for FormatParams
impl TryFrom<&ConversionSpec> for FormatParams
impl StructuralPartialEq for FormatParams
Auto Trait Implementations§
impl RefUnwindSafe for FormatParams
impl Send for FormatParams
impl Sync for FormatParams
impl Unpin for FormatParams
impl UnwindSafe for FormatParams
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.