[−][src]Struct ya_runtime_wasi::DeployFile
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]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Serialize for DeployFile
[src]
Auto Trait Implementations
impl RefUnwindSafe for DeployFile
impl Send for DeployFile
impl Sync for DeployFile
impl Unpin for DeployFile
impl UnwindSafe for DeployFile
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointee for T
type Pointer = u32
fn debug(
pointer: <T as Pointee>::Pointer,
f: &mut Formatter<'_>
) -> Result<(), Error>
pointer: <T as Pointee>::Pointer,
f: &mut Formatter<'_>
) -> Result<(), Error>
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]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,