pub enum DecodedDependency<'a> {
Wit {
resolution: &'a DependencyResolution,
package: UnresolvedPackageGroup,
},
Wasm {
resolution: &'a DependencyResolution,
decoded: DecodedWasm,
},
}Expand description
Represents a decoded dependency.
Variants§
Wit
The dependency decoded from an unresolved WIT package.
Fields
§
resolution: &'a DependencyResolutionThe resolution related to the decoded dependency.
§
package: UnresolvedPackageGroupThe unresolved WIT package.
Wasm
The dependency decoded from a Wasm file.
Fields
§
resolution: &'a DependencyResolutionThe resolution related to the decoded dependency.
§
decoded: DecodedWasmThe decoded Wasm file.
Implementations§
source§impl<'a> DecodedDependency<'a>
impl<'a> DecodedDependency<'a>
sourcepub fn resolve(self) -> Result<(Resolve, PackageId, Vec<PathBuf>)>
pub fn resolve(self) -> Result<(Resolve, PackageId, Vec<PathBuf>)>
Fully resolves the dependency.
If the dependency is an unresolved WIT package, it will assume that the package has no foreign dependencies.
sourcepub fn package_name(&self) -> &PackageName
pub fn package_name(&self) -> &PackageName
Gets the package name of the decoded dependency.
sourcepub fn into_component_world(self) -> Result<(Resolve, WorldId)>
pub fn into_component_world(self) -> Result<(Resolve, WorldId)>
Converts the decoded dependency into a component world.
Returns an error if the dependency is not a decoded component.
Auto Trait Implementations§
impl<'a> Freeze for DecodedDependency<'a>
impl<'a> !RefUnwindSafe for DecodedDependency<'a>
impl<'a> Send for DecodedDependency<'a>
impl<'a> Sync for DecodedDependency<'a>
impl<'a> Unpin for DecodedDependency<'a>
impl<'a> !UnwindSafe for DecodedDependency<'a>
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
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