Struct ibig::fmt::InRadix [−][src]
Representation of a UBig or IBig in any radix between 2 and 36 inclusive.
This can be used to format a number in a non-standard radix.
The default format uses lower-case letters a-z for digits 10-35.
The “alternative” format ({:#}
) uses upper-case letters.
Examples
assert_eq!(format!("{}", ubig!(83).in_radix(3)), "10002"); assert_eq!(format!("{:+010}", ubig!(35).in_radix(36)), "+00000000z"); // For bases 2, 8, 10, 16 we don't have to use `InRadix`: assert_eq!(format!("{:x}", ubig!(3000)), "bb8"); assert_eq!(format!("{:x}", ibig!(-3000)), "-bb8");
Trait Implementations
Auto Trait Implementations
impl<'a> RefUnwindSafe for InRadix<'a>
impl<'a> Send for InRadix<'a>
impl<'a> Sync for InRadix<'a>
impl<'a> Unpin for InRadix<'a>
impl<'a> UnwindSafe for InRadix<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,