Trait radicle_cob::change::store::Storage
source · pub trait Storage {
type StoreError: Error + Send + Sync + 'static;
type LoadError: Error + Send + Sync + 'static;
type ObjectId;
type Parent;
type Signatures;
// Required methods
fn store<G>(
&self,
resource: Option<Self::Parent>,
related: Vec<Self::Parent>,
signer: &G,
template: Template<Self::ObjectId>,
) -> Result<Entry<Self::Parent, Self::ObjectId, Self::Signatures>, Self::StoreError>
where G: Signer;
fn load(
&self,
id: Self::ObjectId,
) -> Result<Entry<Self::Parent, Self::ObjectId, Self::Signatures>, Self::LoadError>;
fn parents_of(&self, id: &Oid) -> Result<Vec<Oid>, Self::LoadError>;
}
Expand description
Change entry storage.
Required Associated Types§
type StoreError: Error + Send + Sync + 'static
type LoadError: Error + Send + Sync + 'static
type ObjectId
type Parent
type Signatures
Required Methods§
sourcefn store<G>(
&self,
resource: Option<Self::Parent>,
related: Vec<Self::Parent>,
signer: &G,
template: Template<Self::ObjectId>,
) -> Result<Entry<Self::Parent, Self::ObjectId, Self::Signatures>, Self::StoreError>where
G: Signer,
fn store<G>(
&self,
resource: Option<Self::Parent>,
related: Vec<Self::Parent>,
signer: &G,
template: Template<Self::ObjectId>,
) -> Result<Entry<Self::Parent, Self::ObjectId, Self::Signatures>, Self::StoreError>where
G: Signer,
Store a new change entry.
Object Safety§
This trait is not object safe.