pub struct VoidRepository { /* private fields */ }Expand description
Void repository handle for TUI access
Implementations§
Source§impl VoidRepository
impl VoidRepository
Sourcepub fn open(path: &Utf8Path, vault: Arc<KeyVault>) -> Result<Self>
pub fn open(path: &Utf8Path, vault: Arc<KeyVault>) -> Result<Self>
Open repository at path with a pre-loaded vault.
The caller (CLI) is responsible for loading the key via identity + manifest and constructing the vault. This avoids the TUI crate needing to know about identity/PIN infrastructure.
Sourcepub fn resolve_head(&self) -> Result<Option<CommitCid>>
pub fn resolve_head(&self) -> Result<Option<CommitCid>>
Resolve HEAD to a commit CID
Sourcepub fn load_commit(&self, cid: &CommitCid) -> Result<VoidCommit>
pub fn load_commit(&self, cid: &CommitCid) -> Result<VoidCommit>
Load a commit by CID
Sourcepub fn walk_commits(
&self,
starts: &[CommitCid],
order: SortOrder,
limit: Option<usize>,
) -> Result<Vec<VoidCommit>>
pub fn walk_commits( &self, starts: &[CommitCid], order: SortOrder, limit: Option<usize>, ) -> Result<Vec<VoidCommit>>
Walk commits starting from the given CIDs
Returns an iterator over commits in the specified order.
Auto Trait Implementations§
impl Freeze for VoidRepository
impl RefUnwindSafe for VoidRepository
impl Send for VoidRepository
impl Sync for VoidRepository
impl Unpin for VoidRepository
impl UnsafeUnpin for VoidRepository
impl UnwindSafe for VoidRepository
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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