Struct rustpython_format::cformat::CFormatSpec
source · 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
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 ==
.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