pub enum ComponentSourceV1 {
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: PackageRefThe 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 (const: unstable) · 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_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 inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreAuto Trait Implementations§
impl !Freeze for ComponentSource
impl RefUnwindSafe for ComponentSource
impl Send for ComponentSource
impl Sync for ComponentSource
impl Unpin for ComponentSource
impl UnsafeUnpin for ComponentSource
impl UnwindSafe for ComponentSource
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<T> ErasedDestructor for Twhere
T: 'static,
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>
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>
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