pub trait WriteRepository: ReadRepository + SignRepository {
// Required methods
fn set_head(&self) -> Result<SetHead, RepositoryError>;
fn set_remote_identity_root_to(
&self,
remote: &PublicKey,
root: Oid,
) -> Result<(), RepositoryError>;
fn set_identity_head_to(&self, commit: Oid) -> Result<(), RepositoryError>;
fn set_user(&self, info: &UserInfo) -> Result<(), Error>;
fn raw(&self) -> &Repository;
// Provided methods
fn set_identity_head(&self) -> Result<Oid, RepositoryError> { ... }
fn set_remote_identity_root(
&self,
remote: &PublicKey,
) -> Result<Oid, RepositoryError> { ... }
}
Expand description
Allows read-write access to a repository.
Required Methods§
Sourcefn set_head(&self) -> Result<SetHead, RepositoryError>
fn set_head(&self) -> Result<SetHead, RepositoryError>
Set the repository head to the canonical branch. This computes the head based on the delegate set.
Sourcefn set_remote_identity_root_to(
&self,
remote: &PublicKey,
root: Oid,
) -> Result<(), RepositoryError>
fn set_remote_identity_root_to( &self, remote: &PublicKey, root: Oid, ) -> Result<(), RepositoryError>
Set the identity root reference to the given commit.
Sourcefn set_identity_head_to(&self, commit: Oid) -> Result<(), RepositoryError>
fn set_identity_head_to(&self, commit: Oid) -> Result<(), RepositoryError>
Set the repository ‘rad/id’ to the given commit.
Sourcefn set_user(&self, info: &UserInfo) -> Result<(), Error>
fn set_user(&self, info: &UserInfo) -> Result<(), Error>
Set the user info of the Git repository.
Sourcefn raw(&self) -> &Repository
fn raw(&self) -> &Repository
Get the underlying git repository.
Provided Methods§
Sourcefn set_identity_head(&self) -> Result<Oid, RepositoryError>
fn set_identity_head(&self) -> Result<Oid, RepositoryError>
Set the repository ‘rad/id’ to the canonical commit, agreed by quorum.
Sourcefn set_remote_identity_root(
&self,
remote: &PublicKey,
) -> Result<Oid, RepositoryError>
fn set_remote_identity_root( &self, remote: &PublicKey, ) -> Result<Oid, RepositoryError>
Set the identity root reference to the canonical identity root commit.
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.