Trait FromFormattedStr

Source
pub trait FromFormattedStr: Sealed + Sized {
    // Required method
    fn from_formatted_str<F>(s: &str, format: &F) -> Result<Self, Error>
       where F: Format;
}
Expand description

Marker trait for number types (e.g. u32) that string-like types can be parsed into via the ParseFormatted trait.

This trait is sealed; so you may not implement it on your own types.

Required Methods§

Source

fn from_formatted_str<F>(s: &str, format: &F) -> Result<Self, Error>
where F: Format,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl FromFormattedStr for i8

Source§

fn from_formatted_str<F>(s: &str, format: &F) -> Result<Self, Error>
where F: Format,

Source§

impl FromFormattedStr for i16

Source§

fn from_formatted_str<F>(s: &str, format: &F) -> Result<Self, Error>
where F: Format,

Source§

impl FromFormattedStr for i32

Source§

fn from_formatted_str<F>(s: &str, format: &F) -> Result<Self, Error>
where F: Format,

Source§

impl FromFormattedStr for i64

Source§

fn from_formatted_str<F>(s: &str, format: &F) -> Result<Self, Error>
where F: Format,

Source§

impl FromFormattedStr for i128

Source§

fn from_formatted_str<F>(s: &str, format: &F) -> Result<Self, Error>
where F: Format,

Source§

impl FromFormattedStr for isize

Source§

fn from_formatted_str<F>(s: &str, format: &F) -> Result<Self, Error>
where F: Format,

Source§

impl FromFormattedStr for u8

Source§

fn from_formatted_str<F>(s: &str, format: &F) -> Result<Self, Error>
where F: Format,

Source§

impl FromFormattedStr for u16

Source§

fn from_formatted_str<F>(s: &str, format: &F) -> Result<Self, Error>
where F: Format,

Source§

impl FromFormattedStr for u32

Source§

fn from_formatted_str<F>(s: &str, format: &F) -> Result<Self, Error>
where F: Format,

Source§

impl FromFormattedStr for u64

Source§

fn from_formatted_str<F>(s: &str, format: &F) -> Result<Self, Error>
where F: Format,

Source§

impl FromFormattedStr for u128

Source§

fn from_formatted_str<F>(s: &str, format: &F) -> Result<Self, Error>
where F: Format,

Source§

impl FromFormattedStr for usize

Source§

fn from_formatted_str<F>(s: &str, format: &F) -> Result<Self, Error>
where F: Format,

Source§

impl FromFormattedStr for NonZeroU8

Source§

fn from_formatted_str<F>(s: &str, format: &F) -> Result<Self, Error>
where F: Format,

Source§

impl FromFormattedStr for NonZeroU16

Source§

fn from_formatted_str<F>(s: &str, format: &F) -> Result<Self, Error>
where F: Format,

Source§

impl FromFormattedStr for NonZeroU32

Source§

fn from_formatted_str<F>(s: &str, format: &F) -> Result<Self, Error>
where F: Format,

Source§

impl FromFormattedStr for NonZeroU64

Source§

fn from_formatted_str<F>(s: &str, format: &F) -> Result<Self, Error>
where F: Format,

Source§

impl FromFormattedStr for NonZeroU128

Source§

fn from_formatted_str<F>(s: &str, format: &F) -> Result<Self, Error>
where F: Format,

Source§

impl FromFormattedStr for NonZeroUsize

Source§

fn from_formatted_str<F>(s: &str, format: &F) -> Result<Self, Error>
where F: Format,

Implementors§