Skip to main content

Inputs

Struct Inputs 

Source
pub struct Inputs<'a> {
    pub repository: &'a Repository,
    pub share: Option<&'a Share>,
    pub index: Option<&'a Index>,
    pub registry: Option<&'a CapabilityRegistry>,
    pub policy: Option<&'a LoadedPolicy>,
}
Expand description

What the resolver may read. A fast resolution carries no index and no registry; a full one carries both, and the presence of the index is what makes it full.

Fields§

§repository: &'a Repository

The repository, already discovered.

§share: Option<&'a Share>

The distribution directory, when it was located.

§index: Option<&'a Index>

The index, in a full resolution.

§registry: Option<&'a CapabilityRegistry>

The registry, in a full resolution.

§policy: Option<&'a LoadedPolicy>

The policy, when the caller has already read it. The resolver reads it itself when this is None, which is what every caller that needs nothing else from it does.

It is here for the one caller that does: majordomus env enter asks the policy whether entry ensures a runtime, and then resolves a snapshot whose provider projections come out of the same file. Two reads of one canonical file inside one invocation is what project.hot-path-reads-once is about, and this is the hot path by definition — it runs on every cd.

Auto Trait Implementations§

§

impl<'a> !RefUnwindSafe for Inputs<'a>

§

impl<'a> !UnwindSafe for Inputs<'a>

§

impl<'a> Freeze for Inputs<'a>

§

impl<'a> Send for Inputs<'a>

§

impl<'a> Sync for Inputs<'a>

§

impl<'a> Unpin for Inputs<'a>

§

impl<'a> UnsafeUnpin for Inputs<'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
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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.

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more