[][src]Struct ya_runtime_wasi::DeployFile

pub struct DeployFile { /* fields omitted */ }

Represents deployed Yagna Wasm image with set up volumes inside the container.

A handle to the deployed image can be obtained after ya_runtime_wasi::deploy command was executed, however, then the image will not have been yet validated. To obtain a handle to a validated image you must run ya_runtime_wasi::start first.

Example

use std::path::Path;
use ya_runtime_wasi::{deploy, DeployFile, start};

deploy(Path::new("workspace"), Path::new("package.zip")).unwrap();
let not_validated = DeployFile::load(Path::new("workspace")).unwrap();

start(Path::new("workspace")).unwrap();
let validated = DeployFile::load(Path::new("workspace")).unwrap();

Implementations

impl DeployFile[src]

pub fn load(work_dir: impl AsRef<Path>) -> Result<Self>[src]

Loads deployed image from workspace where ya_runtime_wasi::deploy was executed.

pub fn image_path(&self) -> &Path[src]

Returns path to the deployed image.

pub fn vols(&self) -> impl Iterator<Item = &ContainerVolume>[src]

Returns an iterator over mapped container volumes.

Trait Implementations

impl<'de> Deserialize<'de> for DeployFile[src]

impl Serialize for DeployFile[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointee for T

type Pointer = u32

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,