pub struct PinnedGitTree<'a> { /* private fields */ }Expand description
The committed objects of one caller-declared commit, without a lock identity.
It reads exactly like CommittedGitTree: committed objects only, through
the native library, with no process, fetch, hook, filter or checkout read.
It carries no locked source, so it never enters the locked package join or
supplies preferred-provider proof; it is comparison evidence only.
Implementations§
Source§impl PinnedGitTree<'static>
impl PinnedGitTree<'static>
Sourcepub fn open(
repository: impl AsRef<Path>,
commit: &str,
options: &LoadOptions,
) -> Result<Self, LoadError>
pub fn open( repository: impl AsRef<Path>, commit: &str, options: &LoadOptions, ) -> Result<Self, LoadError>
Open the committed objects of commit in the repository at repository.
commit is a full 40-character lowercase hexadecimal SHA-1 object ID.
repository must be the repository’s own checkout root or Git
directory, not a directory inside another repository. The commit must
already be present: nothing is fetched. A dirty worktree is neither read
nor certified clean.
§Errors
Refuses a malformed commit ID, a missing repository or commit, a location that is not the repository root, invalid objects/modes and original resource failures.
Trait Implementations§
Source§impl Debug for PinnedGitTree<'_>
impl Debug for PinnedGitTree<'_>
Source§impl Tree for PinnedGitTree<'_>
impl Tree for PinnedGitTree<'_>
Source§fn read(&self, path: &RelPath, max_bytes: u64) -> Result<String, TreeError>
fn read(&self, path: &RelPath, max_bytes: u64) -> Result<String, TreeError>
path. Read moreSource§fn read_bytes(
&self,
path: &RelPath,
max_bytes: u64,
) -> Result<Vec<u8>, TreeError>
fn read_bytes( &self, path: &RelPath, max_bytes: u64, ) -> Result<Vec<u8>, TreeError>
path, with no UTF-8 check, read
through the same verified handle as Tree::read. Read moreSource§fn read_unseen(
&self,
path: &RelPath,
max_bytes: u64,
seen: &dyn Fn(&FileId) -> bool,
) -> Result<Opened, TreeError>
fn read_unseen( &self, path: &RelPath, max_bytes: u64, seen: &dyn Fn(&FileId) -> bool, ) -> Result<Opened, TreeError>
path once, take its identity from that open, and
read its text from the same open unless seen says the identity is
one the caller already holds. Read moreSource§fn list(&self, path: &RelPath) -> Result<Vec<Entry>, TreeError>
fn list(&self, path: &RelPath) -> Result<Vec<Entry>, TreeError>
path, sorted by name. Read moreAuto Trait Implementations§
impl<'a> !Freeze for PinnedGitTree<'a>
impl<'a> !RefUnwindSafe for PinnedGitTree<'a>
impl<'a> !Send for PinnedGitTree<'a>
impl<'a> !Sync for PinnedGitTree<'a>
impl<'a> !UnwindSafe for PinnedGitTree<'a>
impl<'a> Forget for PinnedGitTree<'a>
impl<'a> Move for PinnedGitTree<'a>
impl<'a> Unpin for PinnedGitTree<'a>
impl<'a> UnsafeUnpin for PinnedGitTree<'a>
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
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> ⓘ
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> ⓘ
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