pub struct DiskPinnedTreeProjection { /* private fields */ }Expand description
Exact-tree files backed by disk, but not by the selected worktree.
The private parent must be disk-backed and container-private to the loader. In particular, it must not be mounted into Registry or another writer. The only write handles close before verification and publication; unlinked payloads survive solely through these retained read-only descriptors. The 0400 mode is a guard against mistakes, not the security boundary: arbitrary code running as the loader UID or host root can tamper with the process and is outside the Registry-worktree-mutation threat model.
Implementations§
Source§impl DiskPinnedTreeProjection
impl DiskPinnedTreeProjection
pub fn commit(&self) -> Oid
pub fn root(&self) -> &Path
pub fn file_count(&self) -> usize
Sourcepub fn ensure_current_process(&self) -> Git2DBResult<()>
pub fn ensure_current_process(&self) -> Git2DBResult<()>
A /proc/self/fd alias is valid only in the acquiring process. An
exec’d inference process must not be handed this projection: its CLOEXEC
descriptors are absent and a reused descriptor number could name other
bytes. The active Model→Inference route is threaded, not subprocess.
Sourcepub async fn acquire(
repo_path: &Path,
commit: Oid,
private_disk_parent: &Path,
) -> Git2DBResult<Self>
pub async fn acquire( repo_path: &Path, commit: Oid, private_disk_parent: &Path, ) -> Git2DBResult<Self>
Capture exactly commit into a private disk parent. No partial input
directory is published on any failure.
Sourcepub async fn acquire_bounded(
repo_path: &Path,
commit: Oid,
private_disk_parent: &Path,
) -> Git2DBResult<Self>
pub async fn acquire_bounded( repo_path: &Path, commit: Oid, private_disk_parent: &Path, ) -> Git2DBResult<Self>
Staging admission with one global lease retained until the artifact is dropped. Distinct model refs cannot concurrently consume private disk.
Sourcepub async fn acquire_bounded_with_policy(
repo_path: &Path,
commit: Oid,
private_disk_parent: &Path,
policy: ProjectionPolicy,
) -> Git2DBResult<Self>
pub async fn acquire_bounded_with_policy( repo_path: &Path, commit: Oid, private_disk_parent: &Path, policy: ProjectionPolicy, ) -> Git2DBResult<Self>
Capture under a trusted per-pin policy while retaining the global lease.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DiskPinnedTreeProjection
impl !RefUnwindSafe for DiskPinnedTreeProjection
impl Send for DiskPinnedTreeProjection
impl Sync for DiskPinnedTreeProjection
impl Unpin for DiskPinnedTreeProjection
impl UnsafeUnpin for DiskPinnedTreeProjection
impl !UnwindSafe for DiskPinnedTreeProjection
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
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
§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
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