Skip to main content

WorkspaceLoadOptions

Struct WorkspaceLoadOptions 

Source
pub struct WorkspaceLoadOptions<'a> {
    pub registry: &'a [RegistryPackageSource],
    pub patches: &'a [PatchedPackageSource],
    pub ports: &'a [PortPackageSource],
    pub registry_policy: RegistryPolicy<'a>,
    pub include_dev_for: &'a BTreeSet<String>,
    pub port_policy: PortPolicy<'a>,
}
Expand description

Options bag for the workspace loader. Threads custom policy (registry / patches / ports / dev-dep activation) through a single call.

Fields§

§registry: &'a [RegistryPackageSource]

Already-resolved registry package sources.

§patches: &'a [PatchedPackageSource]

Active patches (resolved by cabin-workspace::patch).

§ports: &'a [PortPackageSource]

Foundation ports that have already been prepared by cabin_port::prepare (downloaded, checksum-verified, safely extracted with strip_prefix, overlay applied). The loader resolves a DependencySource::Port declaration to the matching entry here.

§registry_policy: RegistryPolicy<'a>

How the loader treats a missing-registry edge: every parent is strict by default; pre-resolution loads use RegistryPolicy::StrictFor to scope enforcement (or disable it with an empty set).

§include_dev_for: &'a BTreeSet<String>

Names of packages whose [dev-dependencies] should be loaded as real graph edges. Empty matches the cabin build policy of treating dev-deps as declaration-only; cabin test populates this with the names of the test-running packages.

§port_policy: PortPolicy<'a>

How the loader resolves DependencySource::Port entries. Defaults to PortPolicy::Strict — every port-dep must be present in ports (and on disk, for port-path). Callers that scope port preparation to a narrower selection than the full primary-package set use PortPolicy::TolerateExcept with the selected names so siblings’ missing ports are silently skipped while selected packages still surface the typed PortDependencyNotPrepared / PortDirectoryMissing diagnostic.

Trait Implementations§

Source§

impl<'a> Clone for WorkspaceLoadOptions<'a>

Source§

fn clone(&self) -> WorkspaceLoadOptions<'a>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'a> Debug for WorkspaceLoadOptions<'a>

Source§

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

Formats the value using the given formatter. 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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V