pub struct CommittedGitTree<'a> { /* private fields */ }Expand description
A committed repository read by the native Git library, without checkout reads.
Only this host constructor admits a source to the locked package join. The native object library owns decoding; public authority/FileId constructors cannot fabricate admission. Complete committed listings govern paths and absence. This trusts the native decoder and object store, not authorship or a clean checkout. Decoder internals are outside RAF’s portable meters; acquired buffers and model processing retain their original grants.
Implementations§
Source§impl<'a> CommittedGitTree<'a>
impl<'a> CommittedGitTree<'a>
Sourcepub fn open(
catalog: &'a LockedCatalog,
package: LockedPackageId,
repository: impl AsRef<Path>,
options: &LoadOptions,
) -> Result<Self, LoadError>
pub fn open( catalog: &'a LockedCatalog, package: LockedPackageId, repository: impl AsRef<Path>, options: &LoadOptions, ) -> Result<Self, LoadError>
Open an exact catalog Git commit natively, without processes or fetching.
Paths come solely from committed objects. A dirty worktree is neither read nor certified clean. Locked source identities require SHA-1; portable callers retain the ordinary Tree boundary.
§Errors
Refuses missing repositories/commits, non-Git or unsupported revisions, invalid objects/modes and original resource failures.
Sourcepub const fn source(&self) -> &LockedSource
pub const fn source(&self) -> &LockedSource
The exact locked source selected for this committed host Tree.
Trait Implementations§
Source§impl Debug for CommittedGitTree<'_>
impl Debug for CommittedGitTree<'_>
Source§impl Tree for CommittedGitTree<'_>
impl Tree for CommittedGitTree<'_>
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 identity(&self, path: &RelPath) -> Result<FileId, TreeError>
fn identity(&self, path: &RelPath) -> Result<FileId, TreeError>
path, without reading it: the identity
Tree::read_unseen gives when every identity counts as seen. Read moreAuto Trait Implementations§
impl<'a> !Freeze for CommittedGitTree<'a>
impl<'a> !RefUnwindSafe for CommittedGitTree<'a>
impl<'a> !Send for CommittedGitTree<'a>
impl<'a> !Sync for CommittedGitTree<'a>
impl<'a> !UnwindSafe for CommittedGitTree<'a>
impl<'a> Forget for CommittedGitTree<'a>
impl<'a> Move for CommittedGitTree<'a>
impl<'a> Unpin for CommittedGitTree<'a>
impl<'a> UnsafeUnpin for CommittedGitTree<'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