Skip to main content

SandboxExt

Trait SandboxExt 

Source
pub trait SandboxExt: Sized {
    // Required methods
    fn new(region: Region) -> impl Future<Output = Result<Self, Error>> + Send;
    fn adopt_in(
        region: Region,
        microvm_id: impl Into<String>,
        endpoint: impl Into<String>,
        agent_token: impl Into<String>,
        port: Option<u16>,
    ) -> impl Future<Output = Result<Self, Error>> + Send;
    fn from_name(
        store: &dyn NameStore,
        name: &str,
        region: Option<Region>,
        port: Option<u16>,
    ) -> impl Future<Output = Result<Self, Error>> + Send;
}
Expand description

Sandbox’s constructors that resolve credentials for a region.

Required Methods§

Source

fn new(region: Region) -> impl Future<Output = Result<Self, Error>> + Send

Resolves credentials for region and returns a sandbox with nothing launched.

TRAP-6 is closed by Region before this is reached, which is why there is no region check here.

Source

fn adopt_in( region: Region, microvm_id: impl Into<String>, endpoint: impl Into<String>, agent_token: impl Into<String>, port: Option<u16>, ) -> impl Future<Output = Result<Self, Error>> + Send

Sandbox::adopt over a plane resolved for region, on port when the image’s daemon listens somewhere other than the default. The bindings’ entry point.

Source

fn from_name( store: &dyn NameStore, name: &str, region: Option<Region>, port: Option<u16>, ) -> impl Future<Output = Result<Self, Error>> + Send

Adopts the VM registered as name in store: Sandbox::adopt from a record.

region, when given, must match the record’s; see crate::names::resolve.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§