Skip to main content

BoundSources

Struct BoundSources 

Source
pub struct BoundSources { /* private fields */ }
Expand description

Already-open member objects staged without pathname re-resolution.

A bound source proves which bytes to stage by object identity: the moved open File is the same object whose bytes were acquired and verified, so no directory-entry replacement after the handoff boundary can redirect staged bytes. Handles are single-owner and move-only. File cursors are shared across clones, so this type is deliberately not Clone: move the handle into InstallPlan::prepare_with_bound_sources, which rewinds it to byte zero before staging. Do not try_clone a bound handle and assume an independent offset.

The recorded ArtifactMember::source path of a bound member is advisory diagnostics only once a handle is supplied for its identity.

Implementations§

Source§

impl BoundSources

Source

pub fn new() -> Self

Creates an empty bound-source map, equivalent to no bound members.

Source

pub fn insert(&mut self, member: MemberId, handle: File) -> Option<File>

Registers the already-open object for member, returning any previously registered handle for the same identity.

Trait Implementations§

Source§

impl Debug for BoundSources

Source§

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

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

impl Default for BoundSources

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

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