[][src]Struct grin_core::core::hash::HashWriter

pub struct HashWriter { /* fields omitted */ }

Serializer that outputs a hash of the serialized object

Methods

impl HashWriter[src]

pub fn finalize(self, output: &mut [u8])[src]

Consume the HashWriter, outputting its current hash into a 32-byte array

pub fn into_hash(self) -> Hash[src]

Consume the HashWriter, outputting a Hash corresponding to its current state

Trait Implementations

impl Writer for HashWriter[src]

fn write_u8(&mut self, n: u8) -> Result<(), Error>[src]

Writes a u8 as bytes

fn write_u16(&mut self, n: u16) -> Result<(), Error>[src]

Writes a u16 as bytes

fn write_u32(&mut self, n: u32) -> Result<(), Error>[src]

Writes a u32 as bytes

fn write_i32(&mut self, n: i32) -> Result<(), Error>[src]

Writes a u32 as bytes

fn write_u64(&mut self, n: u64) -> Result<(), Error>[src]

Writes a u64 as bytes

fn write_i64(&mut self, n: i64) -> Result<(), Error>[src]

Writes a i64 as bytes

fn write_bytes<T: AsFixedBytes>(&mut self, bytes: &T) -> Result<(), Error>[src]

Writes a variable number of bytes. The length is encoded as a 64-bit prefix. Read more

impl Default for HashWriter[src]

Auto Trait Implementations

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]

impl<T> UnsafeAny for T where
    T: Any

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> Erased for T