pub struct CFormatSpec {
pub mapping_key: Option<String>,
pub flags: CConversionFlags,
pub min_field_width: Option<CFormatQuantity>,
pub precision: Option<CFormatPrecision>,
pub format_type: CFormatType,
pub format_char: char,
}
Fields§
§mapping_key: Option<String>
§flags: CConversionFlags
§min_field_width: Option<CFormatQuantity>
§precision: Option<CFormatPrecision>
§format_type: CFormatType
§format_char: char
Implementations§
Source§impl CFormatSpec
impl CFormatSpec
pub fn parse<T, I>(iter: &mut ParseIter<I>) -> Result<Self, ParsingError>
pub fn format_string(&self, string: String) -> String
pub fn format_char(&self, ch: char) -> String
pub fn format_bytes(&self, bytes: &[u8]) -> Vec<u8> ⓘ
pub fn format_number(&self, num: &BigInt) -> String
pub fn format_float(&self, num: f64) -> String
Trait Implementations§
Source§impl Debug for CFormatSpec
impl Debug for CFormatSpec
Source§impl FromStr for CFormatSpec
impl FromStr for CFormatSpec
Source§impl PartialEq for CFormatSpec
impl PartialEq for CFormatSpec
impl StructuralPartialEq for CFormatSpec
Auto Trait Implementations§
impl Freeze for CFormatSpec
impl RefUnwindSafe for CFormatSpec
impl Send for CFormatSpec
impl Sync for CFormatSpec
impl Unpin for CFormatSpec
impl UnwindSafe for CFormatSpec
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> 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 more