pub trait WriteStorage: ReadStorage {
type RepositoryMut: WriteRepository;
// Required methods
fn repository_mut(
&self,
rid: RepoId,
) -> Result<Self::RepositoryMut, RepositoryError>;
fn create(&self, rid: RepoId) -> Result<Self::RepositoryMut, Error>;
fn clean(&self, rid: RepoId) -> Result<Vec<PublicKey>, RepositoryError>;
}
Expand description
Allows access to individual storage repositories.
Required Associated Types§
Required Methods§
Sourcefn repository_mut(
&self,
rid: RepoId,
) -> Result<Self::RepositoryMut, RepositoryError>
fn repository_mut( &self, rid: RepoId, ) -> Result<Self::RepositoryMut, RepositoryError>
Open a read-write repository.
Sourcefn create(&self, rid: RepoId) -> Result<Self::RepositoryMut, Error>
fn create(&self, rid: RepoId) -> Result<Self::RepositoryMut, Error>
Create a read-write repository.
Sourcefn clean(&self, rid: RepoId) -> Result<Vec<PublicKey>, RepositoryError>
fn clean(&self, rid: RepoId) -> Result<Vec<PublicKey>, RepositoryError>
Clean the repository found at rid
.
If the local peer has initialised rad/sigrefs
by forking or
creating any COBs, then this will delete all remote namespaces
that are neither the local’s or a delegate’s.
If the local peer has no initialised rad/sigrefs
, then the
repository will be entirely removed from storage.