Skip to main content

RainbowStore

Trait RainbowStore 

Source
pub trait RainbowStore:
    'static
    + Send
    + Sync
    + Clone {
    // Required methods
    fn save_data(
        &self,
        hashes: ObjectHashes,
        data: &[u8],
    ) -> impl RainbowFuture<T = ()>;
    fn contains(&self, hash: Hash) -> impl RainbowFuture<T = bool>;
    fn fetch(
        &self,
        hash: Hash,
    ) -> impl RainbowFuture<T = impl 'static + Send + Sync + AsRef<[u8]>>;

    // Provided methods
    fn saved_point<T: 'static + Traversible, Extra: 'static + Send + Sync + Clone + ExtraFor<T>>(
        &self,
        point: &Point<T>,
        extra: Extra,
    ) -> impl RainbowFuture<T = Point<T>> { ... }
    fn save_point(
        &self,
        point: &impl SingularFetch<T: Traversible>,
    ) -> impl RainbowFuture<T = ()> { ... }
    fn save_topology(
        &self,
        object: &impl Topological,
    ) -> impl RainbowFuture<T = ()> { ... }
    fn save_object(
        &self,
        object: &impl Traversible,
    ) -> impl RainbowFuture<T = ()> { ... }
    fn resolve(&self) -> Arc<dyn Resolve> { ... }
    fn point_extra<T: 'static + FullHash, Extra: 'static + Send + Sync + Clone + ExtraFor<T>>(
        &self,
        hash: Hash,
        extra: Extra,
    ) -> Point<T> { ... }
    fn point<T: Object>(&self, hash: Hash) -> Point<T> { ... }
}

Required Methods§

Source

fn save_data( &self, hashes: ObjectHashes, data: &[u8], ) -> impl RainbowFuture<T = ()>

Source

fn contains(&self, hash: Hash) -> impl RainbowFuture<T = bool>

Source

fn fetch( &self, hash: Hash, ) -> impl RainbowFuture<T = impl 'static + Send + Sync + AsRef<[u8]>>

Provided Methods§

Source

fn saved_point<T: 'static + Traversible, Extra: 'static + Send + Sync + Clone + ExtraFor<T>>( &self, point: &Point<T>, extra: Extra, ) -> impl RainbowFuture<T = Point<T>>

Source

fn save_point( &self, point: &impl SingularFetch<T: Traversible>, ) -> impl RainbowFuture<T = ()>

Source

fn save_topology(&self, object: &impl Topological) -> impl RainbowFuture<T = ()>

Source

fn save_object(&self, object: &impl Traversible) -> impl RainbowFuture<T = ()>

Source

fn resolve(&self) -> Arc<dyn Resolve>

Source

fn point_extra<T: 'static + FullHash, Extra: 'static + Send + Sync + Clone + ExtraFor<T>>( &self, hash: Hash, extra: Extra, ) -> Point<T>

Source

fn point<T: Object>(&self, hash: Hash) -> Point<T>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<__T: RainbowStore> RainbowStore for Lp<__T>

Source§

fn saved_point<T: 'static + Traversible, Extra: 'static + Send + Sync + Clone + ExtraFor<T>>( &self, arg1: &Point<T>, arg2: Extra, ) -> impl RainbowFuture<T = Point<T>>

Source§

fn save_point( &self, arg1: &impl SingularFetch<T: Traversible>, ) -> impl RainbowFuture<T = ()>

Source§

fn save_topology(&self, arg1: &impl Topological) -> impl RainbowFuture<T = ()>

Source§

fn save_object(&self, arg1: &impl Traversible) -> impl RainbowFuture<T = ()>

Source§

fn resolve(&self) -> Arc<dyn Resolve>

Source§

fn point_extra<T: 'static + FullHash, Extra: 'static + Send + Sync + Clone + ExtraFor<T>>( &self, arg1: Hash, arg2: Extra, ) -> Point<T>

Source§

fn point<T: Object>(&self, arg1: Hash) -> Point<T>

Source§

fn save_data( &self, arg1: ObjectHashes, arg2: &[u8], ) -> impl RainbowFuture<T = ()>

Source§

fn contains(&self, arg1: Hash) -> impl RainbowFuture<T = bool>

Source§

fn fetch( &self, arg1: Hash, ) -> impl RainbowFuture<T = impl 'static + Send + Sync + AsRef<[u8]>>

Source§

impl<__T: RainbowStore, __M: 'static + Send + Sync + Clone> RainbowStore for MappedExtra<__T, __M>

Source§

fn saved_point<T: 'static + Traversible, Extra: 'static + Send + Sync + Clone + ExtraFor<T>>( &self, arg1: &Point<T>, arg2: Extra, ) -> impl RainbowFuture<T = Point<T>>

Source§

fn save_point( &self, arg1: &impl SingularFetch<T: Traversible>, ) -> impl RainbowFuture<T = ()>

Source§

fn save_topology(&self, arg1: &impl Topological) -> impl RainbowFuture<T = ()>

Source§

fn save_object(&self, arg1: &impl Traversible) -> impl RainbowFuture<T = ()>

Source§

fn resolve(&self) -> Arc<dyn Resolve>

Source§

fn point_extra<T: 'static + FullHash, Extra: 'static + Send + Sync + Clone + ExtraFor<T>>( &self, arg1: Hash, arg2: Extra, ) -> Point<T>

Source§

fn point<T: Object>(&self, arg1: Hash) -> Point<T>

Source§

fn save_data( &self, arg1: ObjectHashes, arg2: &[u8], ) -> impl RainbowFuture<T = ()>

Source§

fn contains(&self, arg1: Hash) -> impl RainbowFuture<T = bool>

Source§

fn fetch( &self, arg1: Hash, ) -> impl RainbowFuture<T = impl 'static + Send + Sync + AsRef<[u8]>>

Implementors§