Skip to main content

ToBase32

Trait ToBase32 

Source
pub trait ToBase32 {
    // Required method
    fn write_base32<W: WriteBase32>(
        &self,
        writer: &mut W,
    ) -> Result<(), <W as WriteBase32>::Err>;

    // Provided method
    fn to_base32(&self) -> Vec<u5> { ... }
}
Expand description

A trait for converting a value to a type T that represents a u5 slice.

Required Methods§

Source

fn write_base32<W: WriteBase32>( &self, writer: &mut W, ) -> Result<(), <W as WriteBase32>::Err>

Encode as base32 and write it to the supplied writer Implementations shouldn’t allocate.

Provided Methods§

Source

fn to_base32(&self) -> Vec<u5>

Convert Self to base32 vector

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<T: AsRef<[u8]>> ToBase32 for T