[][src]Struct bech32_no_std::Bech32Writer

pub struct Bech32Writer<'a> { /* fields omitted */ }

Allocationless Bech32 writer that accumulates the checksum data internally and writes them out in the end.

Implementations

impl<'a> Bech32Writer<'a>[src]

pub fn new(hrp: &str, fmt: &'a mut dyn Write) -> Result<Bech32Writer<'a>, Error>[src]

Creates a new writer that can write a bech32 string without allocating itself.

This is a rather low-level API and doesn't check the HRP or data length for standard compliance.

pub fn finalize(self) -> Result[src]

Write out the checksum at the end. If this method isn't called this will happen on drop.

Trait Implementations

impl<'a> Drop for Bech32Writer<'a>[src]

impl<'a> WriteBase32 for Bech32Writer<'a>[src]

type Err = Error

Write error

fn write_u5(&mut self, data: u5) -> Result[src]

Writes a single 5 bit value of the data part

Auto Trait Implementations

impl<'a> !RefUnwindSafe for Bech32Writer<'a>

impl<'a> !Send for Bech32Writer<'a>

impl<'a> !Sync for Bech32Writer<'a>

impl<'a> Unpin for Bech32Writer<'a>

impl<'a> !UnwindSafe for Bech32Writer<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.