Trait ys_core::ObjectStore
source · pub trait ObjectStore {
type Error: Into<YsError>;
// Required methods
fn has(
&self,
id: ObjectID
) -> impl Future<Output = Result<bool, Self::Error>> + Send;
fn read(
&self,
id: ObjectID
) -> impl Future<Output = Result<Vec<u8>, Self::Error>> + Send;
fn insert(
&mut self,
object: &[u8]
) -> impl Future<Output = Result<ObjectID, Self::Error>> + Send;
}
Expand description
对象储存位置的通用接口,定义了在内存、目录或网络中存储、读取和检查对象的基本操作。
Required Associated Types§
Required Methods§
Object Safety§
This trait is not object safe.