Struct rustpython_common::cformat::CFormatSpec
source · pub struct CFormatSpec {
pub mapping_key: Option<String>,
pub flags: CConversionFlags,
pub min_field_width: Option<CFormatQuantity>,
pub precision: Option<CFormatQuantity>,
pub format_type: CFormatType,
pub format_char: char,
}
Fields§
§mapping_key: Option<String>
§flags: CConversionFlags
§min_field_width: Option<CFormatQuantity>
§precision: Option<CFormatQuantity>
§format_type: CFormatType
§format_char: char
Implementations§
source§impl CFormatSpec
impl CFormatSpec
pub fn parse<T, I>(iter: &mut ParseIter<I>) -> Result<Self, ParsingError>where
T: Into<char> + Copy,
I: Iterator<Item = T>,
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<CFormatSpec> for CFormatSpec
impl PartialEq<CFormatSpec> for CFormatSpec
source§fn eq(&self, other: &CFormatSpec) -> bool
fn eq(&self, other: &CFormatSpec) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.