Struct rustpython_common::format::FormatSpec
source · pub struct FormatSpec { /* private fields */ }
Implementations§
source§impl FormatSpec
impl FormatSpec
pub fn parse(text: &str) -> Result<Self, FormatSpecError>
pub fn format_float(&self, num: f64) -> Result<String, FormatSpecError>
pub fn format_int(&self, num: &BigInt) -> Result<String, FormatSpecError>
pub fn format_string(
&self,
s: &BorrowedStr<'_>
) -> Result<String, FormatSpecError>
Trait Implementations§
source§impl Debug for FormatSpec
impl Debug for FormatSpec
source§impl FromStr for FormatSpec
impl FromStr for FormatSpec
source§impl PartialEq<FormatSpec> for FormatSpec
impl PartialEq<FormatSpec> for FormatSpec
source§fn eq(&self, other: &FormatSpec) -> bool
fn eq(&self, other: &FormatSpec) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.