Skip to main content

ParseIntRadix

Trait ParseIntRadix 

Source
pub trait ParseIntRadix: Sized {
    // Required methods
    fn from_str_radix(s: &str, radix: u32) -> Result<Self, ParseIntError>;
    fn type_name() -> &'static str;
}
Expand description

Trait for integer types that support parsing from strings with a radix.

Required Methods§

Source

fn from_str_radix(s: &str, radix: u32) -> Result<Self, ParseIntError>

Parse a string as this integer type using the specified radix.

Source

fn type_name() -> &'static str

Returns the name of the integer type as a static string.

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 ParseIntRadix for i32

Source§

fn from_str_radix(s: &str, radix: u32) -> Result<Self, ParseIntError>

Source§

fn type_name() -> &'static str

Source§

impl ParseIntRadix for u8

Source§

fn from_str_radix(s: &str, radix: u32) -> Result<Self, ParseIntError>

Source§

fn type_name() -> &'static str

Source§

impl ParseIntRadix for u16

Source§

fn from_str_radix(s: &str, radix: u32) -> Result<Self, ParseIntError>

Source§

fn type_name() -> &'static str

Source§

impl ParseIntRadix for u32

Source§

fn from_str_radix(s: &str, radix: u32) -> Result<Self, ParseIntError>

Source§

fn type_name() -> &'static str

Source§

impl ParseIntRadix for usize

Source§

fn from_str_radix(s: &str, radix: u32) -> Result<Self, ParseIntError>

Source§

fn type_name() -> &'static str

Implementors§