pub struct Snapshot<'a, Ref> {
pub local_branches: HashSet<Branch<'static>>,
pub nomad_refs: Vec<NomadRef<'a, Ref>>,
_private: (),
}
Expand description
Fields§
§local_branches: HashSet<Branch<'static>>
The active branches in this clone that the user manipulates directly with git branch
etc.
nomad_refs: Vec<NomadRef<'a, Ref>>
The refs that nomad manages to follow the local branches.
_private: ()
Force all callers to go through Snapshot::new
which can validate invariants.
Implementations§
source§impl<Ref> Snapshot<'_, Ref>
impl<Ref> Snapshot<'_, Ref>
source§impl<'a, Ref> Snapshot<'a, Ref>
impl<'a, Ref> Snapshot<'a, Ref>
sourcepub fn prune_deleted_branches(
self,
host: &Host<'_>,
remote_nomad_refs: &RemoteNomadRefSet,
) -> Vec<PruneFrom<'a, Ref>>
pub fn prune_deleted_branches( self, host: &Host<'_>, remote_nomad_refs: &RemoteNomadRefSet, ) -> Vec<PruneFrom<'a, Ref>>
Find nomad host branches that can be pruned because:
- The local branch they were based on no longer exists.
- The remote branch they were based on no longer exists.
Auto Trait Implementations§
impl<'a, Ref> Freeze for Snapshot<'a, Ref>
impl<'a, Ref> RefUnwindSafe for Snapshot<'a, Ref>where
Ref: RefUnwindSafe,
impl<'a, Ref> Send for Snapshot<'a, Ref>where
Ref: Send,
impl<'a, Ref> Sync for Snapshot<'a, Ref>where
Ref: Sync,
impl<'a, Ref> Unpin for Snapshot<'a, Ref>where
Ref: Unpin,
impl<'a, Ref> UnwindSafe for Snapshot<'a, Ref>where
Ref: UnwindSafe,
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