Skip to main content

BucketSource

Trait BucketSource 

Source
pub trait BucketSource:
    Send
    + Sync
    + 'static {
    type Bucket: Send + Sync;
    type K: Send + Sync;
    type V: Send + Sync;
    type All: Stream<Item = Result<(Self::K, Self::V), Status>> + Send + Unpin + 'static;

    // Required method
    fn get_all_by_bucket<'life0, 'async_trait>(
        &'life0 self,
        b: Self::Bucket,
    ) -> Pin<Box<dyn Future<Output = Result<Self::All, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Source of buckets(a bucket has key/val pairs)

Required Associated Types§

Source

type Bucket: Send + Sync

Source

type K: Send + Sync

Source

type V: Send + Sync

Source

type All: Stream<Item = Result<(Self::K, Self::V), Status>> + Send + Unpin + 'static

Required Methods§

Source

fn get_all_by_bucket<'life0, 'async_trait>( &'life0 self, b: Self::Bucket, ) -> Pin<Box<dyn Future<Output = Result<Self::All, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Gets all key/val pairs from a bucket Self::Bucket

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<A> BucketSource for Arc<A>
where A: BucketSource,

Source§

type Bucket = <A as BucketSource>::Bucket

Source§

type K = <A as BucketSource>::K

Source§

type V = <A as BucketSource>::V

Source§

type All = <A as BucketSource>::All

Source§

fn get_all_by_bucket<'life0, 'async_trait>( &'life0 self, b: Self::Bucket, ) -> Pin<Box<dyn Future<Output = Result<Self::All, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementors§

Source§

impl<A, B, M> BucketSource for BucketMerge<A, B, M>
where A: BucketSource<Bucket = ()>, A::K: Ord, A::V: Clone, B: BucketSource<K = A::K>, M: Clone + Merge<A = A::V, B = B::V>,

Source§

type Bucket = <B as BucketSource>::Bucket

Source§

type K = <A as BucketSource>::K

Source§

type V = <M as Merge>::T

Source§

type All = ReceiverStream<Result<(<BucketMerge<A, B, M> as BucketSource>::K, <BucketMerge<A, B, M> as BucketSource>::V), Status>>

Source§

impl<B, C> BucketSource for ConvSource<B, C>
where B: BucketSource, B::K: Clone, C: Clone + Converter<Input = (B::K, B::V)>,

Source§

impl<M, B> BucketSource for BucketSrcMapd<M, B>
where M: Clone + Mapper, B: BucketSource<K = M::IK, V = M::IV>,

Source§

impl<M, S> BucketSource for MergedSource<M, S>
where M: Merger + Clone, S::K: Clone, S: MemSource<Bucket = M::Bucket, K = M::K, V = M::T>,

Source§

type Bucket = (Vec<<S as MemSource>::K>, Vec<<S as MemSource>::Bucket>)

Source§

type K = <S as MemSource>::K

Source§

type V = <M as Merger>::U

Source§

type All = ReceiverStream<Result<(<MergedSource<M, S> as BucketSource>::K, <MergedSource<M, S> as BucketSource>::V), Status>>

Source§

impl<R> BucketSource for ReadSrc<R>
where R: ReadSource,