[][src]Struct bech32::Bech32Writer

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

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

Methods

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> 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

fn write(&mut self, data: &[u5]) -> Result<(), Self::Err>[src]

Write a u5 slice

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

Auto Trait Implementations

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

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

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

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

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

Blanket Implementations

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.

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

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

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