pub struct Client { /* private fields */ }Expand description
dvm.run’s API, at an address, as the user whose key it bears. Cheap to clone: clones share their connections.
Implementations§
Source§impl Client
impl Client
Sourcepub fn from_env() -> Result<Self>
pub fn from_env() -> Result<Self>
dvm.run at DVM_API_URL, else https://sandbox.dvm.run, with the key
in DVM_API_KEY, else the one dvm-run login saved for it.
Sourcepub fn new(api_url: impl Into<String>, api_key: impl Into<String>) -> Self
pub fn new(api_url: impl Into<String>, api_key: impl Into<String>) -> Self
dvm.run at api_url, with api_key.
Sourcepub fn create_sandbox(&self, image: impl Into<String>) -> SandboxBuilder
pub fn create_sandbox(&self, image: impl Into<String>) -> SandboxBuilder
A sandbox of image, as docker run takes it, once it’s running.
Sourcepub async fn connect_sandbox(&self, id: SandboxId) -> Result<Sandbox>
pub async fn connect_sandbox(&self, id: SandboxId) -> Result<Sandbox>
A handle to a sandbox made elsewhere.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Client
impl !UnwindSafe for Client
impl Forget for Client
impl Freeze for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl UnsafeUnpin for Client
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
Mutably borrows from an owned value. Read more