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 DecodedDependency<'_>
impl DecodedDependency<'_>
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> !RefUnwindSafe for DecodedDependency<'a>
impl<'a> !UnwindSafe for DecodedDependency<'a>
impl<'a> Freeze for DecodedDependency<'a>
impl<'a> Send for DecodedDependency<'a>
impl<'a> Sync for DecodedDependency<'a>
impl<'a> Unpin for DecodedDependency<'a>
impl<'a> UnsafeUnpin 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