Skip to main content

Streamable

Trait Streamable 

Source
pub trait Streamable<S>
where S: BlockStorage + Clone + 'static,
{ type Item; type Stream: Stream<Item = Self::Item> + 'static; // Required method fn stream(&self, storage: S) -> Self::Stream; }

Required Associated Types§

Source

type Item

Source

type Stream: Stream<Item = Self::Item> + 'static

Required Methods§

Source

fn stream(&self, storage: S) -> Self::Stream

Implementors§

Source§

impl<S, K> Streamable<S> for CoSet<K>
where S: AnyBlockStorage, K: Hash + Ord + Clone + Serialize + DeserializeOwned + Send + Sync + 'static,

Source§

type Item = Result<K, StorageError>

Source§

type Stream = Pin<Box<dyn Stream<Item = <CoSet<K> as Streamable<S>>::Item> + Send>>

Source§

impl<S, K, V> Streamable<S> for CoMap<K, V>
where S: AnyBlockStorage, K: Hash + Ord + Clone + Serialize + DeserializeOwned + Send + Sync + 'static, V: Clone + Serialize + DeserializeOwned + Send + Sync + 'static,

Source§

type Item = Result<(K, V), StorageError>

Source§

type Stream = Pin<Box<dyn Stream<Item = <CoMap<K, V> as Streamable<S>>::Item> + Send>>

Source§

impl<S, V> Streamable<S> for CoList<V>
where S: AnyBlockStorage, V: Clone + Serialize + DeserializeOwned + Send + Sync + 'static,