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§
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>
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.