Skip to main content

CommittedGitTree

Struct CommittedGitTree 

Source
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>

Source

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.

Source

pub const fn source(&self) -> &LockedSource

The exact locked source selected for this committed host Tree.

Source

pub fn usage(&self) -> Usage

RAF’s acquired protocol, native storage and processing charges.

Trait Implementations§

Source§

impl Debug for CommittedGitTree<'_>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Tree for CommittedGitTree<'_>

Source§

fn read(&self, path: &RelPath, max_bytes: u64) -> Result<String, TreeError>

The text of the file at path. Read more
Source§

fn read_bytes( &self, path: &RelPath, max_bytes: u64, ) -> Result<Vec<u8>, TreeError>

The exact bytes of the file at path, with no UTF-8 check, read through the same verified handle as Tree::read. Read more
Source§

fn read_unseen( &self, path: &RelPath, max_bytes: u64, seen: &dyn Fn(&FileId) -> bool, ) -> Result<Opened, TreeError>

Open the file at 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 more
Source§

fn identity(&self, path: &RelPath) -> Result<FileId, TreeError>

The identity of the file at path, without reading it: the identity Tree::read_unseen gives when every identity counts as seen. Read more
Source§

fn list(&self, path: &RelPath) -> Result<Vec<Entry>, TreeError>

The entries of the directory at path, sorted by name. Read more
Source§

fn entry(&self, path: &RelPath) -> Result<Option<EntryKind>, TreeError>

What is at path, or None when nothing is. Read more

Auto 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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.