pub struct SourcePack { /* private fields */ }Implementations§
Source§impl SourcePack
impl SourcePack
Sourcepub fn prepare(
source: &impl ObjectSource,
selected: &State,
scratch_root: &Path,
budget: SourceBudget,
) -> Result<Self, Error>
pub fn prepare( source: &impl ObjectSource, selected: &State, scratch_root: &Path, budget: SourceBudget, ) -> Result<Self, Error>
Performs disk I/O and compression. Async applications run preparation on their blocking-work executor. The output owns and removes its scratch.
Sourcepub fn prepare_with_references(
source: &impl ObjectSource,
selected: &State,
references: &[ReferenceProof],
scratch_root: &Path,
budget: SourceBudget,
) -> Result<Self, Error>
pub fn prepare_with_references( source: &impl ObjectSource, selected: &State, references: &[ReferenceProof], scratch_root: &Path, budget: SourceBudget, ) -> Result<Self, Error>
Include only descriptor closures selected by independently verified source operation proofs. A reference never authorizes another source revision.
Sourcepub fn artifacts(&self) -> &[PackExtent; 2]
pub fn artifacts(&self) -> &[PackExtent; 2]
Whole, independently hashed artifacts in transmission order. Source preparation bounds the decoded closure before producing this inventory.
Sourcepub async fn open_artifacts(&self) -> Result<[File; 2], Error>
pub async fn open_artifacts(&self) -> Result<[File; 2], Error>
Open the exact prepared artifacts without buffering their bodies. Keep this SourcePack alive until the readers finish; dropping it removes its temporary files, including after a cancelled transfer.
pub fn revision(&self) -> StateId
Auto Trait Implementations§
impl Freeze for SourcePack
impl RefUnwindSafe for SourcePack
impl Send for SourcePack
impl Sync for SourcePack
impl Unpin for SourcePack
impl UnsafeUnpin for SourcePack
impl UnwindSafe for SourcePack
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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