Struct rustpython_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_bool(&self, input: bool) -> Result<String, 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<T>(&self, s: &T) -> Result<String, FormatSpecError>where T: CharLen + Deref<Target = str>,
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 ==
.impl StructuralPartialEq for FormatSpec
Auto Trait Implementations§
impl RefUnwindSafe for FormatSpec
impl Send for FormatSpec
impl Sync for FormatSpec
impl Unpin for FormatSpec
impl UnwindSafe for FormatSpec
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