ComponentLike

Trait ComponentLike 

Source
pub trait ComponentLike {
    type Dependency: DependencyLike;

    // Required methods
    fn dependencies(
        &self,
    ) -> impl ExactSizeIterator<Item = (&DependencyName, &Self::Dependency)>;
    fn id(&self) -> &str;
}
Expand description

A Spin component. This abstracts over the list of dependencies for the component. The abstraction allows both manifest and lockfile types to participate in composition.

Required Associated Types§

Required Methods§

Source

fn dependencies( &self, ) -> impl ExactSizeIterator<Item = (&DependencyName, &Self::Dependency)>

Source

fn id(&self) -> &str

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl ComponentLike for LockedComponent

Source§

type Dependency = LockedComponentDependency

Source§

fn dependencies( &self, ) -> impl ExactSizeIterator<Item = (&DependencyName, &Self::Dependency)>

Source§

fn id(&self) -> &str

Implementors§