pub struct Refs(/* private fields */);Expand description
The published state of a local repository.
Implementations§
Source§impl Refs
impl Refs
pub fn new() -> Refs
Sourcepub fn save<R, S>(
self,
namespace: PublicKey,
committer: Committer,
repo: &R,
signer: &S,
) -> Result<SignedRefs, Error>
pub fn save<R, S>( self, namespace: PublicKey, committer: Committer, repo: &R, signer: &S, ) -> Result<SignedRefs, Error>
Save the signed refs to disk. This creates a new commit on the signed refs branch, and updates the branch pointer.
Sourcepub fn force_save<R, S>(
self,
namespace: PublicKey,
committer: Committer,
repo: &R,
signer: &S,
) -> Result<SignedRefs, Error>
pub fn force_save<R, S>( self, namespace: PublicKey, committer: Committer, repo: &R, signer: &S, ) -> Result<SignedRefs, Error>
Save the signed refs to disk, even if the refs are unchanged.
pub fn insert(&mut self, refname: RefString, target: Oid) -> Option<Oid>
pub fn iter<'a>(&'a self) -> Iter<'a, RefString, Oid>
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
Trait Implementations§
Source§impl IntoIterator for Refs
impl IntoIterator for Refs
Source§impl Serialize for Refs
impl Serialize for Refs
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Eq for Refs
impl StructuralPartialEq for Refs
Auto Trait Implementations§
impl Freeze for Refs
impl RefUnwindSafe for Refs
impl Send for Refs
impl Sync for Refs
impl Unpin for Refs
impl UnsafeUnpin for Refs
impl UnwindSafe for Refs
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more