pub struct ContainersResource { /* private fields */ }Expand description
EN: Containers API resource. 中文:Containers API 资源。
Implementations§
Source§impl ContainersResource
impl ContainersResource
Sourcepub async fn create(
&self,
request: CreateContainerRequest,
) -> Result<Container, LingerError>
pub async fn create( &self, request: CreateContainerRequest, ) -> Result<Container, LingerError>
EN: Creates a container with POST /v1/containers.
中文:使用 POST /v1/containers 创建容器。
Sourcepub async fn list(&self) -> Result<ContainerPage, LingerError>
pub async fn list(&self) -> Result<ContainerPage, LingerError>
EN: Lists containers with GET /v1/containers.
中文:使用 GET /v1/containers 列出容器。
Sourcepub async fn retrieve(
&self,
container_id: &str,
) -> Result<Container, LingerError>
pub async fn retrieve( &self, container_id: &str, ) -> Result<Container, LingerError>
EN: Retrieves a container with GET /v1/containers/{container_id}.
中文:使用 GET /v1/containers/{container_id} 获取容器。
Sourcepub async fn delete(
&self,
container_id: &str,
) -> Result<ContainerDeletion, LingerError>
pub async fn delete( &self, container_id: &str, ) -> Result<ContainerDeletion, LingerError>
EN: Deletes a container with DELETE /v1/containers/{container_id}.
中文:使用 DELETE /v1/containers/{container_id} 删除容器。
Sourcepub fn files(&self, container_id: &str) -> ContainerFilesResource
pub fn files(&self, container_id: &str) -> ContainerFilesResource
EN: Returns the Container Files subresource for a container id. 中文:返回指定容器 ID 的 Container Files 子资源。
Trait Implementations§
Source§impl Clone for ContainersResource
impl Clone for ContainersResource
Source§fn clone(&self) -> ContainersResource
fn clone(&self) -> ContainersResource
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for ContainersResource
impl !UnwindSafe for ContainersResource
impl Freeze for ContainersResource
impl Send for ContainersResource
impl Sync for ContainersResource
impl Unpin for ContainersResource
impl UnsafeUnpin for ContainersResource
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