pub trait ToRadixStr: Sized {
    // Required method
    fn to_radix_str(self, base: Base) -> Result<String, InvalidBaseError>;
}
Expand description

Allows a type to be converted to radix string representation.

Required Methods§

source

fn to_radix_str(self, base: Base) -> Result<String, InvalidBaseError>

Returns the radix string representation of self using the functionality as defined in the ECMAScript Language Specification Section 9.8.1 “ToString Applied to the Number Type”.

Returns InvalidBaseError if the given Base is out of range of MIN_BASE and MAX_BASE (inclusive).

Implementations on Foreign Types§

source§

impl ToRadixStr for f64

source§

impl ToRadixStr for f32

Implementors§