pub struct RefsTable { /* private fields */ }Expand description
The refs table — manages branches and HEAD.
Implementations§
Source§impl RefsTable
impl RefsTable
Sourcepub fn create_branch(
&mut self,
name: &str,
commit_id: &str,
) -> Result<(), RefsError>
pub fn create_branch( &mut self, name: &str, commit_id: &str, ) -> Result<(), RefsError>
Create a new branch at the given commit.
Sourcepub fn switch_head(&mut self, name: &str) -> Result<(), RefsError>
pub fn switch_head(&mut self, name: &str) -> Result<(), RefsError>
Switch HEAD to a different branch.
Sourcepub fn update_ref(
&mut self,
name: &str,
commit_id: &str,
) -> Result<(), RefsError>
pub fn update_ref( &mut self, name: &str, commit_id: &str, ) -> Result<(), RefsError>
Update a branch to point to a new commit.
Tags are immutable and cannot be updated — use create_tag instead.
Sourcepub fn delete_branch(&mut self, name: &str) -> Result<(), RefsError>
pub fn delete_branch(&mut self, name: &str) -> Result<(), RefsError>
Delete a branch by name.
Cannot delete the HEAD branch. Cannot delete a nonexistent branch. Deleting a branch does NOT delete the commits it pointed to.
Sourcepub fn create_tag(
&mut self,
name: &str,
commit_id: &str,
) -> Result<(), RefsError>
pub fn create_tag( &mut self, name: &str, commit_id: &str, ) -> Result<(), RefsError>
Create an immutable tag pointing to a commit.
Tags cannot be overwritten or moved once created.
List all tags.
Sourcepub fn to_record_batch(&self) -> Result<RecordBatch, ArrowError>
pub fn to_record_batch(&self) -> Result<RecordBatch, ArrowError>
Convert to Arrow RecordBatch.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RefsTable
impl RefUnwindSafe for RefsTable
impl Send for RefsTable
impl Sync for RefsTable
impl Unpin for RefsTable
impl UnsafeUnpin for RefsTable
impl UnwindSafe for RefsTable
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