pub struct View { /* private fields */ }
Implementations§
source§impl View
impl View
pub fn new(op_store_view: View) -> Self
pub fn wc_commit_ids(&self) -> &HashMap<WorkspaceId, CommitId>
pub fn get_wc_commit_id(&self, workspace_id: &WorkspaceId) -> Option<&CommitId>
pub fn workspaces_for_wc_commit_id( &self, commit_id: &CommitId ) -> Vec<WorkspaceId>
pub fn is_wc_commit_id(&self, commit_id: &CommitId) -> bool
pub fn heads(&self) -> &HashSet<CommitId>
pub fn public_heads(&self) -> &HashSet<CommitId>
pub fn branches(&self) -> &BTreeMap<String, BranchTarget>
pub fn git_refs(&self) -> &BTreeMap<String, RefTarget>
pub fn git_head(&self) -> Option<&RefTarget>
pub fn set_wc_commit(&mut self, workspace_id: WorkspaceId, commit_id: CommitId)
pub fn remove_wc_commit(&mut self, workspace_id: &WorkspaceId)
pub fn add_head(&mut self, head_id: &CommitId)
pub fn remove_head(&mut self, head_id: &CommitId)
pub fn add_public_head(&mut self, head_id: &CommitId)
pub fn remove_public_head(&mut self, head_id: &CommitId)
pub fn get_ref(&self, name: &RefName) -> Option<RefTarget>
sourcepub fn set_ref_target(&mut self, name: &RefName, target: Option<RefTarget>)
pub fn set_ref_target(&mut self, name: &RefName, target: Option<RefTarget>)
Sets reference of the specified kind to point to the given target. If the target is absent, the reference will be removed.
pub fn get_branch(&self, name: &str) -> Option<&BranchTarget>
pub fn set_branch(&mut self, name: String, target: BranchTarget)
pub fn remove_branch(&mut self, name: &str)
pub fn get_local_branch(&self, name: &str) -> Option<RefTarget>
sourcepub fn set_local_branch_target(&mut self, name: &str, target: Option<RefTarget>)
pub fn set_local_branch_target(&mut self, name: &str, target: Option<RefTarget>)
Sets local branch to point to the given target. If the target is absent, and if no associated remote branches exist, the branch will be removed.
pub fn get_remote_branch( &self, name: &str, remote_name: &str ) -> Option<RefTarget>
sourcepub fn set_remote_branch_target(
&mut self,
name: &str,
remote_name: &str,
target: Option<RefTarget>
)
pub fn set_remote_branch_target( &mut self, name: &str, remote_name: &str, target: Option<RefTarget> )
Sets remote-tracking branch to point to the given target. If the target is absent, the branch will be removed.
pub fn rename_remote(&mut self, old: &str, new: &str)
pub fn get_tag(&self, name: &str) -> Option<RefTarget>
sourcepub fn set_tag_target(&mut self, name: &str, target: Option<RefTarget>)
pub fn set_tag_target(&mut self, name: &str, target: Option<RefTarget>)
Sets tag to point to the given target. If the target is absent, the tag will be removed.
pub fn get_git_ref(&self, name: &str) -> Option<RefTarget>
sourcepub fn set_git_ref_target(&mut self, name: &str, target: Option<RefTarget>)
pub fn set_git_ref_target(&mut self, name: &str, target: Option<RefTarget>)
Sets the last imported Git ref to point to the given target. If the target is absent, the reference will be removed.
sourcepub fn set_git_head_target(&mut self, target: Option<RefTarget>)
pub fn set_git_head_target(&mut self, target: Option<RefTarget>)
Sets HEAD@git
to point to the given target. If the target is absent,
the reference will be cleared.
pub fn set_view(&mut self, data: View)
pub fn store_view(&self) -> &View
pub fn store_view_mut(&mut self) -> &mut View
pub fn merge_single_ref( &mut self, index: &dyn Index, ref_name: &RefName, base_target: Option<&RefTarget>, other_target: Option<&RefTarget> )
Trait Implementations§
source§impl PartialEq<View> for View
impl PartialEq<View> for View
impl Eq for View
impl StructuralEq for View
impl StructuralPartialEq for View
Auto Trait Implementations§
impl RefUnwindSafe for View
impl Send for View
impl Sync for View
impl Unpin for View
impl UnwindSafe for View
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