Trait enso_prelude::Num [−][src]
pub trait Num: PartialEq<Self> + Zero + One + NumOps<Self, Self> { type FromStrRadixErr; fn from_str_radix(
str: &str,
radix: u32
) -> Result<Self, Self::FromStrRadixErr>; }
Expand description
The base trait for numeric types, covering 0
and 1
values,
comparisons, basic numeric operations, and string conversion.
Associated Types
type FromStrRadixErr
[src]
type FromStrRadixErr
[src]Required methods
fn from_str_radix(str: &str, radix: u32) -> Result<Self, Self::FromStrRadixErr>
[src]
fn from_str_radix(str: &str, radix: u32) -> Result<Self, Self::FromStrRadixErr>
[src]Convert from a string and radix (typically 2..=36
).
Examples
use num_traits::Num; let result = <i32 as Num>::from_str_radix("27", 10); assert_eq!(result, Ok(27)); let result = <i32 as Num>::from_str_radix("foo", 10); assert!(result.is_err());
Supported radices
The exact range of supported radices is at the discretion of each type implementation. For
primitive integers, this is implemented by the inherent from_str_radix
methods in the
standard library, which panic if the radix is not in the range from 2 to 36. The
implementation in this crate for primitive floats is similar.
For third-party types, it is suggested that implementations should follow suit and at least
accept 2..=36
without panicking, but an Err
may be returned for any unsupported radix.
It’s possible that a type might not even support the common radix 10, nor any, if string
parsing doesn’t make sense for that type.
Implementations on Foreign Types
impl Num for BigInt
[src]
impl Num for BigInt
[src]pub fn from_str_radix(s: &str, radix: u32) -> Result<BigInt, ParseBigIntError>
[src]
pub fn from_str_radix(s: &str, radix: u32) -> Result<BigInt, ParseBigIntError>
[src]Creates and initializes a BigInt.
type FromStrRadixErr = ParseBigIntError
impl Num for BigUint
[src]
impl Num for BigUint
[src]pub fn from_str_radix(s: &str, radix: u32) -> Result<BigUint, ParseBigIntError>
[src]
pub fn from_str_radix(s: &str, radix: u32) -> Result<BigUint, ParseBigIntError>
[src]Creates and initializes a BigUint
.
type FromStrRadixErr = ParseBigIntError
impl<T> Num for Wrapping<T> where
T: Num,
Wrapping<T>: Mul<Wrapping<T>>,
Wrapping<T>: Add<Wrapping<T>>,
Wrapping<T>: Div<Wrapping<T>>,
Wrapping<T>: Rem<Wrapping<T>>,
Wrapping<T>: Sub<Wrapping<T>>,
<Wrapping<T> as Add<Wrapping<T>>>::Output == Wrapping<T>,
<Wrapping<T> as Sub<Wrapping<T>>>::Output == Wrapping<T>,
<Wrapping<T> as Mul<Wrapping<T>>>::Output == Wrapping<T>,
<Wrapping<T> as Div<Wrapping<T>>>::Output == Wrapping<T>,
<Wrapping<T> as Rem<Wrapping<T>>>::Output == Wrapping<T>,
[src]
impl<T> Num for Wrapping<T> where
T: Num,
Wrapping<T>: Mul<Wrapping<T>>,
Wrapping<T>: Add<Wrapping<T>>,
Wrapping<T>: Div<Wrapping<T>>,
Wrapping<T>: Rem<Wrapping<T>>,
Wrapping<T>: Sub<Wrapping<T>>,
<Wrapping<T> as Add<Wrapping<T>>>::Output == Wrapping<T>,
<Wrapping<T> as Sub<Wrapping<T>>>::Output == Wrapping<T>,
<Wrapping<T> as Mul<Wrapping<T>>>::Output == Wrapping<T>,
<Wrapping<T> as Div<Wrapping<T>>>::Output == Wrapping<T>,
<Wrapping<T> as Rem<Wrapping<T>>>::Output == Wrapping<T>,
[src]type FromStrRadixErr = <T as Num>::FromStrRadixErr
pub fn from_str_radix(
str: &str,
radix: u32
) -> Result<Wrapping<T>, <Wrapping<T> as Num>::FromStrRadixErr>
[src]
str: &str,
radix: u32
) -> Result<Wrapping<T>, <Wrapping<T> as Num>::FromStrRadixErr>
impl Num for i16
[src]
impl Num for i16
[src]type FromStrRadixErr = ParseIntError
pub fn from_str_radix(s: &str, radix: u32) -> Result<i16, ParseIntError>
[src]
impl Num for i128
[src]
impl Num for i128
[src]type FromStrRadixErr = ParseIntError
pub fn from_str_radix(s: &str, radix: u32) -> Result<i128, ParseIntError>
[src]
impl Num for u128
[src]
impl Num for u128
[src]type FromStrRadixErr = ParseIntError
pub fn from_str_radix(s: &str, radix: u32) -> Result<u128, ParseIntError>
[src]
impl Num for u64
[src]
impl Num for u64
[src]type FromStrRadixErr = ParseIntError
pub fn from_str_radix(s: &str, radix: u32) -> Result<u64, ParseIntError>
[src]
impl Num for f64
[src]
impl Num for f64
[src]type FromStrRadixErr = ParseFloatError
pub fn from_str_radix(
src: &str,
radix: u32
) -> Result<f64, <f64 as Num>::FromStrRadixErr>
[src]
src: &str,
radix: u32
) -> Result<f64, <f64 as Num>::FromStrRadixErr>
impl Num for u8
[src]
impl Num for u8
[src]type FromStrRadixErr = ParseIntError
pub fn from_str_radix(s: &str, radix: u32) -> Result<u8, ParseIntError>
[src]
impl Num for i8
[src]
impl Num for i8
[src]type FromStrRadixErr = ParseIntError
pub fn from_str_radix(s: &str, radix: u32) -> Result<i8, ParseIntError>
[src]
impl Num for i64
[src]
impl Num for i64
[src]type FromStrRadixErr = ParseIntError
pub fn from_str_radix(s: &str, radix: u32) -> Result<i64, ParseIntError>
[src]
impl Num for u32
[src]
impl Num for u32
[src]type FromStrRadixErr = ParseIntError
pub fn from_str_radix(s: &str, radix: u32) -> Result<u32, ParseIntError>
[src]
impl Num for u16
[src]
impl Num for u16
[src]type FromStrRadixErr = ParseIntError
pub fn from_str_radix(s: &str, radix: u32) -> Result<u16, ParseIntError>
[src]
impl Num for usize
[src]
impl Num for usize
[src]type FromStrRadixErr = ParseIntError
pub fn from_str_radix(s: &str, radix: u32) -> Result<usize, ParseIntError>
[src]
impl Num for isize
[src]
impl Num for isize
[src]type FromStrRadixErr = ParseIntError
pub fn from_str_radix(s: &str, radix: u32) -> Result<isize, ParseIntError>
[src]
impl Num for i32
[src]
impl Num for i32
[src]type FromStrRadixErr = ParseIntError
pub fn from_str_radix(s: &str, radix: u32) -> Result<i32, ParseIntError>
[src]
impl Num for f32
[src]
impl Num for f32
[src]type FromStrRadixErr = ParseFloatError
pub fn from_str_radix(
src: &str,
radix: u32
) -> Result<f32, <f32 as Num>::FromStrRadixErr>
[src]
src: &str,
radix: u32
) -> Result<f32, <f32 as Num>::FromStrRadixErr>
impl<T> Num for Complex<T> where
T: Num + Clone,
[src]
impl<T> Num for Complex<T> where
T: Num + Clone,
[src]pub fn from_str_radix(
s: &str,
radix: u32
) -> Result<Complex<T>, <Complex<T> as Num>::FromStrRadixErr>
[src]
pub fn from_str_radix(
s: &str,
radix: u32
) -> Result<Complex<T>, <Complex<T> as Num>::FromStrRadixErr>
[src]Parses a +/- bi
; ai +/- b
; a
; or bi
where a
and b
are of type T
type FromStrRadixErr = ParseComplexError<<T as Num>::FromStrRadixErr>
impl<T> Num for Ratio<T> where
T: Clone + Integer,
[src]
impl<T> Num for Ratio<T> where
T: Clone + Integer,
[src]pub fn from_str_radix(s: &str, radix: u32) -> Result<Ratio<T>, ParseRatioError>
[src]
pub fn from_str_radix(s: &str, radix: u32) -> Result<Ratio<T>, ParseRatioError>
[src]Parses numer/denom
where the numbers are in base radix
.
type FromStrRadixErr = ParseRatioError
impl Num for AutoSimd<[f32; 8]>
impl Num for AutoSimd<[f32; 8]>
type FromStrRadixErr = <f32 as Num>::FromStrRadixErr
pub fn from_str_radix(
str: &str,
radix: u32
) -> Result<AutoSimd<[f32; 8]>, <AutoSimd<[f32; 8]> as Num>::FromStrRadixErr>
str: &str,
radix: u32
) -> Result<AutoSimd<[f32; 8]>, <AutoSimd<[f32; 8]> as Num>::FromStrRadixErr>
impl Num for AutoSimd<[u16; 16]>
impl Num for AutoSimd<[u16; 16]>
type FromStrRadixErr = <u16 as Num>::FromStrRadixErr
pub fn from_str_radix(
str: &str,
radix: u32
) -> Result<AutoSimd<[u16; 16]>, <AutoSimd<[u16; 16]> as Num>::FromStrRadixErr>
str: &str,
radix: u32
) -> Result<AutoSimd<[u16; 16]>, <AutoSimd<[u16; 16]> as Num>::FromStrRadixErr>
impl Num for AutoSimd<[i128; 4]>
impl Num for AutoSimd<[i128; 4]>
type FromStrRadixErr = <i128 as Num>::FromStrRadixErr
pub fn from_str_radix(
str: &str,
radix: u32
) -> Result<AutoSimd<[i128; 4]>, <AutoSimd<[i128; 4]> as Num>::FromStrRadixErr>
str: &str,
radix: u32
) -> Result<AutoSimd<[i128; 4]>, <AutoSimd<[i128; 4]> as Num>::FromStrRadixErr>
impl Num for AutoSimd<[u64; 8]>
impl Num for AutoSimd<[u64; 8]>
type FromStrRadixErr = <u64 as Num>::FromStrRadixErr
pub fn from_str_radix(
str: &str,
radix: u32
) -> Result<AutoSimd<[u64; 8]>, <AutoSimd<[u64; 8]> as Num>::FromStrRadixErr>
str: &str,
radix: u32
) -> Result<AutoSimd<[u64; 8]>, <AutoSimd<[u64; 8]> as Num>::FromStrRadixErr>
impl Num for AutoSimd<[u32; 2]>
impl Num for AutoSimd<[u32; 2]>
type FromStrRadixErr = <u32 as Num>::FromStrRadixErr
pub fn from_str_radix(
str: &str,
radix: u32
) -> Result<AutoSimd<[u32; 2]>, <AutoSimd<[u32; 2]> as Num>::FromStrRadixErr>
str: &str,
radix: u32
) -> Result<AutoSimd<[u32; 2]>, <AutoSimd<[u32; 2]> as Num>::FromStrRadixErr>
impl Num for AutoSimd<[i128; 2]>
impl Num for AutoSimd<[i128; 2]>
type FromStrRadixErr = <i128 as Num>::FromStrRadixErr
pub fn from_str_radix(
str: &str,
radix: u32
) -> Result<AutoSimd<[i128; 2]>, <AutoSimd<[i128; 2]> as Num>::FromStrRadixErr>
str: &str,
radix: u32
) -> Result<AutoSimd<[i128; 2]>, <AutoSimd<[i128; 2]> as Num>::FromStrRadixErr>
impl Num for AutoSimd<[u32; 8]>
impl Num for AutoSimd<[u32; 8]>
type FromStrRadixErr = <u32 as Num>::FromStrRadixErr
pub fn from_str_radix(
str: &str,
radix: u32
) -> Result<AutoSimd<[u32; 8]>, <AutoSimd<[u32; 8]> as Num>::FromStrRadixErr>
str: &str,
radix: u32
) -> Result<AutoSimd<[u32; 8]>, <AutoSimd<[u32; 8]> as Num>::FromStrRadixErr>
impl Num for AutoSimd<[i16; 2]>
impl Num for AutoSimd<[i16; 2]>
type FromStrRadixErr = <i16 as Num>::FromStrRadixErr
pub fn from_str_radix(
str: &str,
radix: u32
) -> Result<AutoSimd<[i16; 2]>, <AutoSimd<[i16; 2]> as Num>::FromStrRadixErr>
str: &str,
radix: u32
) -> Result<AutoSimd<[i16; 2]>, <AutoSimd<[i16; 2]> as Num>::FromStrRadixErr>
impl Num for AutoSimd<[u8; 4]>
impl Num for AutoSimd<[u8; 4]>
type FromStrRadixErr = <u8 as Num>::FromStrRadixErr
pub fn from_str_radix(
str: &str,
radix: u32
) -> Result<AutoSimd<[u8; 4]>, <AutoSimd<[u8; 4]> as Num>::FromStrRadixErr>
str: &str,
radix: u32
) -> Result<AutoSimd<[u8; 4]>, <AutoSimd<[u8; 4]> as Num>::FromStrRadixErr>
impl Num for AutoSimd<[u64; 4]>
impl Num for AutoSimd<[u64; 4]>
type FromStrRadixErr = <u64 as Num>::FromStrRadixErr
pub fn from_str_radix(
str: &str,
radix: u32
) -> Result<AutoSimd<[u64; 4]>, <AutoSimd<[u64; 4]> as Num>::FromStrRadixErr>
str: &str,
radix: u32
) -> Result<AutoSimd<[u64; 4]>, <AutoSimd<[u64; 4]> as Num>::FromStrRadixErr>
impl Num for AutoSimd<[f32; 16]>
impl Num for AutoSimd<[f32; 16]>
type FromStrRadixErr = <f32 as Num>::FromStrRadixErr
pub fn from_str_radix(
str: &str,
radix: u32
) -> Result<AutoSimd<[f32; 16]>, <AutoSimd<[f32; 16]> as Num>::FromStrRadixErr>
str: &str,
radix: u32
) -> Result<AutoSimd<[f32; 16]>, <AutoSimd<[f32; 16]> as Num>::FromStrRadixErr>
impl Num for AutoSimd<[i16; 16]>
impl Num for AutoSimd<[i16; 16]>
type FromStrRadixErr = <i16 as Num>::FromStrRadixErr
pub fn from_str_radix(
str: &str,
radix: u32
) -> Result<AutoSimd<[i16; 16]>, <AutoSimd<[i16; 16]> as Num>::FromStrRadixErr>
str: &str,
radix: u32
) -> Result<AutoSimd<[i16; 16]>, <AutoSimd<[i16; 16]> as Num>::FromStrRadixErr>
impl Num for AutoSimd<[f64; 2]>
impl Num for AutoSimd<[f64; 2]>
type FromStrRadixErr = <f64 as Num>::FromStrRadixErr
pub fn from_str_radix(
str: &str,
radix: u32
) -> Result<AutoSimd<[f64; 2]>, <AutoSimd<[f64; 2]> as Num>::FromStrRadixErr>
str: &str,
radix: u32
) -> Result<AutoSimd<[f64; 2]>, <AutoSimd<[f64; 2]> as Num>::FromStrRadixErr>
impl Num for AutoSimd<[i32; 8]>
impl Num for AutoSimd<[i32; 8]>
type FromStrRadixErr = <i32 as Num>::FromStrRadixErr
pub fn from_str_radix(
str: &str,
radix: u32
) -> Result<AutoSimd<[i32; 8]>, <AutoSimd<[i32; 8]> as Num>::FromStrRadixErr>
str: &str,
radix: u32
) -> Result<AutoSimd<[i32; 8]>, <AutoSimd<[i32; 8]> as Num>::FromStrRadixErr>
impl Num for AutoSimd<[i64; 4]>
impl Num for AutoSimd<[i64; 4]>
type FromStrRadixErr = <i64 as Num>::FromStrRadixErr
pub fn from_str_radix(
str: &str,
radix: u32
) -> Result<AutoSimd<[i64; 4]>, <AutoSimd<[i64; 4]> as Num>::FromStrRadixErr>
str: &str,
radix: u32
) -> Result<AutoSimd<[i64; 4]>, <AutoSimd<[i64; 4]> as Num>::FromStrRadixErr>
impl Num for AutoSimd<[u32; 4]>
impl Num for AutoSimd<[u32; 4]>
type FromStrRadixErr = <u32 as Num>::FromStrRadixErr
pub fn from_str_radix(
str: &str,
radix: u32
) -> Result<AutoSimd<[u32; 4]>, <AutoSimd<[u32; 4]> as Num>::FromStrRadixErr>
str: &str,
radix: u32
) -> Result<AutoSimd<[u32; 4]>, <AutoSimd<[u32; 4]> as Num>::FromStrRadixErr>
impl Num for AutoSimd<[i16; 32]>
impl Num for AutoSimd<[i16; 32]>
type FromStrRadixErr = <i16 as Num>::FromStrRadixErr
pub fn from_str_radix(
str: &str,
radix: u32
) -> Result<AutoSimd<[i16; 32]>, <AutoSimd<[i16; 32]> as Num>::FromStrRadixErr>
str: &str,
radix: u32
) -> Result<AutoSimd<[i16; 32]>, <AutoSimd<[i16; 32]> as Num>::FromStrRadixErr>
impl Num for AutoSimd<[u8; 32]>
impl Num for AutoSimd<[u8; 32]>
type FromStrRadixErr = <u8 as Num>::FromStrRadixErr
pub fn from_str_radix(
str: &str,
radix: u32
) -> Result<AutoSimd<[u8; 32]>, <AutoSimd<[u8; 32]> as Num>::FromStrRadixErr>
str: &str,
radix: u32
) -> Result<AutoSimd<[u8; 32]>, <AutoSimd<[u8; 32]> as Num>::FromStrRadixErr>
impl Num for AutoSimd<[u16; 32]>
impl Num for AutoSimd<[u16; 32]>
type FromStrRadixErr = <u16 as Num>::FromStrRadixErr
pub fn from_str_radix(
str: &str,
radix: u32
) -> Result<AutoSimd<[u16; 32]>, <AutoSimd<[u16; 32]> as Num>::FromStrRadixErr>
str: &str,
radix: u32
) -> Result<AutoSimd<[u16; 32]>, <AutoSimd<[u16; 32]> as Num>::FromStrRadixErr>
impl Num for AutoSimd<[i32; 2]>
impl Num for AutoSimd<[i32; 2]>
type FromStrRadixErr = <i32 as Num>::FromStrRadixErr
pub fn from_str_radix(
str: &str,
radix: u32
) -> Result<AutoSimd<[i32; 2]>, <AutoSimd<[i32; 2]> as Num>::FromStrRadixErr>
str: &str,
radix: u32
) -> Result<AutoSimd<[i32; 2]>, <AutoSimd<[i32; 2]> as Num>::FromStrRadixErr>
impl Num for AutoSimd<[i8; 32]>
impl Num for AutoSimd<[i8; 32]>
type FromStrRadixErr = <i8 as Num>::FromStrRadixErr
pub fn from_str_radix(
str: &str,
radix: u32
) -> Result<AutoSimd<[i8; 32]>, <AutoSimd<[i8; 32]> as Num>::FromStrRadixErr>
str: &str,
radix: u32
) -> Result<AutoSimd<[i8; 32]>, <AutoSimd<[i8; 32]> as Num>::FromStrRadixErr>
impl Num for AutoSimd<[usize; 2]>
impl Num for AutoSimd<[usize; 2]>
type FromStrRadixErr = <usize as Num>::FromStrRadixErr
pub fn from_str_radix(
str: &str,
radix: u32
) -> Result<AutoSimd<[usize; 2]>, <AutoSimd<[usize; 2]> as Num>::FromStrRadixErr>
str: &str,
radix: u32
) -> Result<AutoSimd<[usize; 2]>, <AutoSimd<[usize; 2]> as Num>::FromStrRadixErr>
impl Num for AutoSimd<[usize; 4]>
impl Num for AutoSimd<[usize; 4]>
type FromStrRadixErr = <usize as Num>::FromStrRadixErr
pub fn from_str_radix(
str: &str,
radix: u32
) -> Result<AutoSimd<[usize; 4]>, <AutoSimd<[usize; 4]> as Num>::FromStrRadixErr>
str: &str,
radix: u32
) -> Result<AutoSimd<[usize; 4]>, <AutoSimd<[usize; 4]> as Num>::FromStrRadixErr>
impl Num for AutoSimd<[i64; 8]>
impl Num for AutoSimd<[i64; 8]>
type FromStrRadixErr = <i64 as Num>::FromStrRadixErr
pub fn from_str_radix(
str: &str,
radix: u32
) -> Result<AutoSimd<[i64; 8]>, <AutoSimd<[i64; 8]> as Num>::FromStrRadixErr>
str: &str,
radix: u32
) -> Result<AutoSimd<[i64; 8]>, <AutoSimd<[i64; 8]> as Num>::FromStrRadixErr>
impl Num for AutoSimd<[i8; 2]>
impl Num for AutoSimd<[i8; 2]>
type FromStrRadixErr = <i8 as Num>::FromStrRadixErr
pub fn from_str_radix(
str: &str,
radix: u32
) -> Result<AutoSimd<[i8; 2]>, <AutoSimd<[i8; 2]> as Num>::FromStrRadixErr>
str: &str,
radix: u32
) -> Result<AutoSimd<[i8; 2]>, <AutoSimd<[i8; 2]> as Num>::FromStrRadixErr>
impl Num for AutoSimd<[f32; 4]>
impl Num for AutoSimd<[f32; 4]>
type FromStrRadixErr = <f32 as Num>::FromStrRadixErr
pub fn from_str_radix(
str: &str,
radix: u32
) -> Result<AutoSimd<[f32; 4]>, <AutoSimd<[f32; 4]> as Num>::FromStrRadixErr>
str: &str,
radix: u32
) -> Result<AutoSimd<[f32; 4]>, <AutoSimd<[f32; 4]> as Num>::FromStrRadixErr>
impl Num for AutoSimd<[i16; 4]>
impl Num for AutoSimd<[i16; 4]>
type FromStrRadixErr = <i16 as Num>::FromStrRadixErr
pub fn from_str_radix(
str: &str,
radix: u32
) -> Result<AutoSimd<[i16; 4]>, <AutoSimd<[i16; 4]> as Num>::FromStrRadixErr>
str: &str,
radix: u32
) -> Result<AutoSimd<[i16; 4]>, <AutoSimd<[i16; 4]> as Num>::FromStrRadixErr>
impl Num for AutoSimd<[f64; 4]>
impl Num for AutoSimd<[f64; 4]>
type FromStrRadixErr = <f64 as Num>::FromStrRadixErr
pub fn from_str_radix(
str: &str,
radix: u32
) -> Result<AutoSimd<[f64; 4]>, <AutoSimd<[f64; 4]> as Num>::FromStrRadixErr>
str: &str,
radix: u32
) -> Result<AutoSimd<[f64; 4]>, <AutoSimd<[f64; 4]> as Num>::FromStrRadixErr>
impl Num for AutoSimd<[u128; 1]>
impl Num for AutoSimd<[u128; 1]>
type FromStrRadixErr = <u128 as Num>::FromStrRadixErr
pub fn from_str_radix(
str: &str,
radix: u32
) -> Result<AutoSimd<[u128; 1]>, <AutoSimd<[u128; 1]> as Num>::FromStrRadixErr>
str: &str,
radix: u32
) -> Result<AutoSimd<[u128; 1]>, <AutoSimd<[u128; 1]> as Num>::FromStrRadixErr>
impl Num for AutoSimd<[u16; 8]>
impl Num for AutoSimd<[u16; 8]>
type FromStrRadixErr = <u16 as Num>::FromStrRadixErr
pub fn from_str_radix(
str: &str,
radix: u32
) -> Result<AutoSimd<[u16; 8]>, <AutoSimd<[u16; 8]> as Num>::FromStrRadixErr>
str: &str,
radix: u32
) -> Result<AutoSimd<[u16; 8]>, <AutoSimd<[u16; 8]> as Num>::FromStrRadixErr>
impl Num for AutoSimd<[i32; 4]>
impl Num for AutoSimd<[i32; 4]>
type FromStrRadixErr = <i32 as Num>::FromStrRadixErr
pub fn from_str_radix(
str: &str,
radix: u32
) -> Result<AutoSimd<[i32; 4]>, <AutoSimd<[i32; 4]> as Num>::FromStrRadixErr>
str: &str,
radix: u32
) -> Result<AutoSimd<[i32; 4]>, <AutoSimd<[i32; 4]> as Num>::FromStrRadixErr>
impl Num for AutoSimd<[i16; 8]>
impl Num for AutoSimd<[i16; 8]>
type FromStrRadixErr = <i16 as Num>::FromStrRadixErr
pub fn from_str_radix(
str: &str,
radix: u32
) -> Result<AutoSimd<[i16; 8]>, <AutoSimd<[i16; 8]> as Num>::FromStrRadixErr>
str: &str,
radix: u32
) -> Result<AutoSimd<[i16; 8]>, <AutoSimd<[i16; 8]> as Num>::FromStrRadixErr>
impl Num for AutoSimd<[i8; 4]>
impl Num for AutoSimd<[i8; 4]>
type FromStrRadixErr = <i8 as Num>::FromStrRadixErr
pub fn from_str_radix(
str: &str,
radix: u32
) -> Result<AutoSimd<[i8; 4]>, <AutoSimd<[i8; 4]> as Num>::FromStrRadixErr>
str: &str,
radix: u32
) -> Result<AutoSimd<[i8; 4]>, <AutoSimd<[i8; 4]> as Num>::FromStrRadixErr>
impl Num for AutoSimd<[u16; 4]>
impl Num for AutoSimd<[u16; 4]>
type FromStrRadixErr = <u16 as Num>::FromStrRadixErr
pub fn from_str_radix(
str: &str,
radix: u32
) -> Result<AutoSimd<[u16; 4]>, <AutoSimd<[u16; 4]> as Num>::FromStrRadixErr>
str: &str,
radix: u32
) -> Result<AutoSimd<[u16; 4]>, <AutoSimd<[u16; 4]> as Num>::FromStrRadixErr>
impl Num for AutoSimd<[u8; 16]>
impl Num for AutoSimd<[u8; 16]>
type FromStrRadixErr = <u8 as Num>::FromStrRadixErr
pub fn from_str_radix(
str: &str,
radix: u32
) -> Result<AutoSimd<[u8; 16]>, <AutoSimd<[u8; 16]> as Num>::FromStrRadixErr>
str: &str,
radix: u32
) -> Result<AutoSimd<[u8; 16]>, <AutoSimd<[u8; 16]> as Num>::FromStrRadixErr>
impl Num for AutoSimd<[isize; 8]>
impl Num for AutoSimd<[isize; 8]>
type FromStrRadixErr = <isize as Num>::FromStrRadixErr
pub fn from_str_radix(
str: &str,
radix: u32
) -> Result<AutoSimd<[isize; 8]>, <AutoSimd<[isize; 8]> as Num>::FromStrRadixErr>
str: &str,
radix: u32
) -> Result<AutoSimd<[isize; 8]>, <AutoSimd<[isize; 8]> as Num>::FromStrRadixErr>
impl Num for AutoSimd<[u128; 4]>
impl Num for AutoSimd<[u128; 4]>
type FromStrRadixErr = <u128 as Num>::FromStrRadixErr
pub fn from_str_radix(
str: &str,
radix: u32
) -> Result<AutoSimd<[u128; 4]>, <AutoSimd<[u128; 4]> as Num>::FromStrRadixErr>
str: &str,
radix: u32
) -> Result<AutoSimd<[u128; 4]>, <AutoSimd<[u128; 4]> as Num>::FromStrRadixErr>
impl Num for AutoSimd<[f64; 8]>
impl Num for AutoSimd<[f64; 8]>
type FromStrRadixErr = <f64 as Num>::FromStrRadixErr
pub fn from_str_radix(
str: &str,
radix: u32
) -> Result<AutoSimd<[f64; 8]>, <AutoSimd<[f64; 8]> as Num>::FromStrRadixErr>
str: &str,
radix: u32
) -> Result<AutoSimd<[f64; 8]>, <AutoSimd<[f64; 8]> as Num>::FromStrRadixErr>
impl Num for AutoSimd<[u8; 8]>
impl Num for AutoSimd<[u8; 8]>
type FromStrRadixErr = <u8 as Num>::FromStrRadixErr
pub fn from_str_radix(
str: &str,
radix: u32
) -> Result<AutoSimd<[u8; 8]>, <AutoSimd<[u8; 8]> as Num>::FromStrRadixErr>
str: &str,
radix: u32
) -> Result<AutoSimd<[u8; 8]>, <AutoSimd<[u8; 8]> as Num>::FromStrRadixErr>
impl Num for AutoSimd<[isize; 4]>
impl Num for AutoSimd<[isize; 4]>
type FromStrRadixErr = <isize as Num>::FromStrRadixErr
pub fn from_str_radix(
str: &str,
radix: u32
) -> Result<AutoSimd<[isize; 4]>, <AutoSimd<[isize; 4]> as Num>::FromStrRadixErr>
str: &str,
radix: u32
) -> Result<AutoSimd<[isize; 4]>, <AutoSimd<[isize; 4]> as Num>::FromStrRadixErr>
impl Num for AutoSimd<[i8; 8]>
impl Num for AutoSimd<[i8; 8]>
type FromStrRadixErr = <i8 as Num>::FromStrRadixErr
pub fn from_str_radix(
str: &str,
radix: u32
) -> Result<AutoSimd<[i8; 8]>, <AutoSimd<[i8; 8]> as Num>::FromStrRadixErr>
str: &str,
radix: u32
) -> Result<AutoSimd<[i8; 8]>, <AutoSimd<[i8; 8]> as Num>::FromStrRadixErr>
impl Num for AutoSimd<[u16; 2]>
impl Num for AutoSimd<[u16; 2]>
type FromStrRadixErr = <u16 as Num>::FromStrRadixErr
pub fn from_str_radix(
str: &str,
radix: u32
) -> Result<AutoSimd<[u16; 2]>, <AutoSimd<[u16; 2]> as Num>::FromStrRadixErr>
str: &str,
radix: u32
) -> Result<AutoSimd<[u16; 2]>, <AutoSimd<[u16; 2]> as Num>::FromStrRadixErr>
impl Num for AutoSimd<[usize; 8]>
impl Num for AutoSimd<[usize; 8]>
type FromStrRadixErr = <usize as Num>::FromStrRadixErr
pub fn from_str_radix(
str: &str,
radix: u32
) -> Result<AutoSimd<[usize; 8]>, <AutoSimd<[usize; 8]> as Num>::FromStrRadixErr>
str: &str,
radix: u32
) -> Result<AutoSimd<[usize; 8]>, <AutoSimd<[usize; 8]> as Num>::FromStrRadixErr>
impl Num for AutoSimd<[f32; 2]>
impl Num for AutoSimd<[f32; 2]>
type FromStrRadixErr = <f32 as Num>::FromStrRadixErr
pub fn from_str_radix(
str: &str,
radix: u32
) -> Result<AutoSimd<[f32; 2]>, <AutoSimd<[f32; 2]> as Num>::FromStrRadixErr>
str: &str,
radix: u32
) -> Result<AutoSimd<[f32; 2]>, <AutoSimd<[f32; 2]> as Num>::FromStrRadixErr>
impl Num for AutoSimd<[u32; 16]>
impl Num for AutoSimd<[u32; 16]>
type FromStrRadixErr = <u32 as Num>::FromStrRadixErr
pub fn from_str_radix(
str: &str,
radix: u32
) -> Result<AutoSimd<[u32; 16]>, <AutoSimd<[u32; 16]> as Num>::FromStrRadixErr>
str: &str,
radix: u32
) -> Result<AutoSimd<[u32; 16]>, <AutoSimd<[u32; 16]> as Num>::FromStrRadixErr>
impl Num for AutoSimd<[i8; 16]>
impl Num for AutoSimd<[i8; 16]>
type FromStrRadixErr = <i8 as Num>::FromStrRadixErr
pub fn from_str_radix(
str: &str,
radix: u32
) -> Result<AutoSimd<[i8; 16]>, <AutoSimd<[i8; 16]> as Num>::FromStrRadixErr>
str: &str,
radix: u32
) -> Result<AutoSimd<[i8; 16]>, <AutoSimd<[i8; 16]> as Num>::FromStrRadixErr>
impl Num for AutoSimd<[u128; 2]>
impl Num for AutoSimd<[u128; 2]>
type FromStrRadixErr = <u128 as Num>::FromStrRadixErr
pub fn from_str_radix(
str: &str,
radix: u32
) -> Result<AutoSimd<[u128; 2]>, <AutoSimd<[u128; 2]> as Num>::FromStrRadixErr>
str: &str,
radix: u32
) -> Result<AutoSimd<[u128; 2]>, <AutoSimd<[u128; 2]> as Num>::FromStrRadixErr>
impl Num for AutoSimd<[i64; 2]>
impl Num for AutoSimd<[i64; 2]>
type FromStrRadixErr = <i64 as Num>::FromStrRadixErr
pub fn from_str_radix(
str: &str,
radix: u32
) -> Result<AutoSimd<[i64; 2]>, <AutoSimd<[i64; 2]> as Num>::FromStrRadixErr>
str: &str,
radix: u32
) -> Result<AutoSimd<[i64; 2]>, <AutoSimd<[i64; 2]> as Num>::FromStrRadixErr>
impl Num for AutoSimd<[u64; 2]>
impl Num for AutoSimd<[u64; 2]>
type FromStrRadixErr = <u64 as Num>::FromStrRadixErr
pub fn from_str_radix(
str: &str,
radix: u32
) -> Result<AutoSimd<[u64; 2]>, <AutoSimd<[u64; 2]> as Num>::FromStrRadixErr>
str: &str,
radix: u32
) -> Result<AutoSimd<[u64; 2]>, <AutoSimd<[u64; 2]> as Num>::FromStrRadixErr>
impl Num for AutoSimd<[u8; 2]>
impl Num for AutoSimd<[u8; 2]>
type FromStrRadixErr = <u8 as Num>::FromStrRadixErr
pub fn from_str_radix(
str: &str,
radix: u32
) -> Result<AutoSimd<[u8; 2]>, <AutoSimd<[u8; 2]> as Num>::FromStrRadixErr>
str: &str,
radix: u32
) -> Result<AutoSimd<[u8; 2]>, <AutoSimd<[u8; 2]> as Num>::FromStrRadixErr>
impl Num for AutoSimd<[isize; 2]>
impl Num for AutoSimd<[isize; 2]>
type FromStrRadixErr = <isize as Num>::FromStrRadixErr
pub fn from_str_radix(
str: &str,
radix: u32
) -> Result<AutoSimd<[isize; 2]>, <AutoSimd<[isize; 2]> as Num>::FromStrRadixErr>
str: &str,
radix: u32
) -> Result<AutoSimd<[isize; 2]>, <AutoSimd<[isize; 2]> as Num>::FromStrRadixErr>
impl Num for AutoSimd<[i32; 16]>
impl Num for AutoSimd<[i32; 16]>
type FromStrRadixErr = <i32 as Num>::FromStrRadixErr
pub fn from_str_radix(
str: &str,
radix: u32
) -> Result<AutoSimd<[i32; 16]>, <AutoSimd<[i32; 16]> as Num>::FromStrRadixErr>
str: &str,
radix: u32
) -> Result<AutoSimd<[i32; 16]>, <AutoSimd<[i32; 16]> as Num>::FromStrRadixErr>
impl Num for AutoSimd<[i128; 1]>
impl Num for AutoSimd<[i128; 1]>
type FromStrRadixErr = <i128 as Num>::FromStrRadixErr
pub fn from_str_radix(
str: &str,
radix: u32
) -> Result<AutoSimd<[i128; 1]>, <AutoSimd<[i128; 1]> as Num>::FromStrRadixErr>
str: &str,
radix: u32
) -> Result<AutoSimd<[i128; 1]>, <AutoSimd<[i128; 1]> as Num>::FromStrRadixErr>
impl<T> Num for Complex<T> where
T: Num + Clone,
[src]
impl<T> Num for Complex<T> where
T: Num + Clone,
[src]pub fn from_str_radix(
s: &str,
radix: u32
) -> Result<Complex<T>, <Complex<T> as Num>::FromStrRadixErr>
[src]
pub fn from_str_radix(
s: &str,
radix: u32
) -> Result<Complex<T>, <Complex<T> as Num>::FromStrRadixErr>
[src]Parses a +/- bi
; ai +/- b
; a
; or bi
where a
and b
are of type T
type FromStrRadixErr = ParseComplexError<<T as Num>::FromStrRadixErr>
impl<T> Num for Ratio<T> where
T: Clone + Integer,
[src]
impl<T> Num for Ratio<T> where
T: Clone + Integer,
[src]pub fn from_str_radix(s: &str, radix: u32) -> Result<Ratio<T>, ParseRatioError>
[src]
pub fn from_str_radix(s: &str, radix: u32) -> Result<Ratio<T>, ParseRatioError>
[src]Parses numer/denom
where the numbers are in base radix
.