pub enum ComponentSource {
Local(String),
Remote {
url: String,
digest: String,
},
Registry {
registry: Option<Registry>,
package: PackageRef,
version: String,
},
}
Expand description
The file, package, or URL containing the component Wasm binary. This may be:
- The path to a Wasm file (relative to the manifest file)
Example: source = "bin/cart.wasm"
- The URL of a Wasm file downloadable over HTTP, accompanied by a digest to ensure integrity
Example: source = { url = "https://example.com/example.wasm", digest = "sha256:6503...2375" }
- The registry, package and version of a component from a registry
Example: source = { registry = "ttl.sh", package = "user:registrytest", version="1.0.0" }
Learn more: https://spinframework.dev/writing-apps#the-component-source
Variants§
Local(String)
source = "bin/cart.wasm"
Remote
source = { url = "https://example.com/example.wasm", digest = "sha256:6503...2375" }
Fields
Registry
source = { registry = "ttl.sh", package = "user:registrytest", version="1.0.0" }
Fields
registry: Option<Registry>
The registry containing the Wasm component binary.
Example: registry = "example.com"
Learn more: https://spinframework.dev/writing-apps#the-component-source
package: PackageRef
The package containing the Wasm component binary.
Example: package = "example:component"
Learn more: https://spinframework.dev/writing-apps#the-component-source
Trait Implementations§
Source§impl Clone for ComponentSource
impl Clone for ComponentSource
Source§fn clone(&self) -> ComponentSource
fn clone(&self) -> ComponentSource
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for ComponentSource
impl Debug for ComponentSource
Source§impl<'de> Deserialize<'de> for ComponentSource
impl<'de> Deserialize<'de> for ComponentSource
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Display for ComponentSource
impl Display for ComponentSource
Source§impl JsonSchema for ComponentSource
impl JsonSchema for ComponentSource
Source§fn schema_name() -> String
fn schema_name() -> String
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
$ref
keyword. Read more