[][src]Trait canonical::Sink

pub trait Sink<S: Store> {
    fn copy_bytes(&mut self, bytes: &[u8]);
fn recur<T: Canon<S>>(&self, t: &T) -> Result<S::Ident, S::Error>;
fn fin(self) -> S::Ident; }

Trait to implement writing bytes to an underlying storage

Required methods

fn copy_bytes(&mut self, bytes: &[u8])

Copy bytes from a slice into the Sink

fn recur<T: Canon<S>>(&self, t: &T) -> Result<S::Ident, S::Error>

Recursively create another sink for storing children

fn fin(self) -> S::Ident

Consume the sink and return the ident of written data

Loading content...

Implementors

impl<'a, S> Sink<S> for ByteSink<'a, S> where
    S: Store
[src]

impl<S> Sink<S> for DrySink<S> where
    S: Store
[src]

Loading content...