Trait WriteRepository

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

Source

fn set_head(&self) -> Result<SetHead, RepositoryError>

Set the repository head to the canonical branch. This computes the head based on the delegate set.

Source

fn set_remote_identity_root_to( &self, remote: &PublicKey, root: Oid, ) -> Result<(), RepositoryError>

Set the identity root reference to the given commit.

Source

fn set_identity_head_to(&self, commit: Oid) -> Result<(), RepositoryError>

Set the repository ‘rad/id’ to the given commit.

Source

fn set_user(&self, info: &UserInfo) -> Result<(), Error>

Set the user info of the Git repository.

Source

fn raw(&self) -> &Repository

Get the underlying git repository.

Provided Methods§

Source

fn set_identity_head(&self) -> Result<Oid, RepositoryError>

Set the repository ‘rad/id’ to the canonical commit, agreed by quorum.

Source

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.

Implementors§