Trait radix_ecmascript::ToRadixStr
source · 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§
sourcefn to_radix_str(self, base: Base) -> Result<String, InvalidBaseError>
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).