pub struct Containers<'c, C: Config> { /* private fields */ }Available on crate feature
container only.Implementations§
Source§impl<'c, C: Config> Containers<'c, C>
impl<'c, C: Config> Containers<'c, C>
pub fn new(client: &'c Client<C>) -> Self
Sourcepub fn files(&self, container_id: &str) -> ContainerFiles<'_, C>
pub fn files(&self, container_id: &str) -> ContainerFiles<'_, C>
ContainerFiles API group
Sourcepub async fn create(
&self,
request: CreateContainerRequest,
) -> Result<ContainerResource, OpenAIError>
pub async fn create( &self, request: CreateContainerRequest, ) -> Result<ContainerResource, OpenAIError>
Create a container. Create a container.
Sourcepub async fn create_byot<T0: Serialize, R: DeserializeOwned>(
&self,
request: T0,
) -> Result<R, OpenAIError>
pub async fn create_byot<T0: Serialize, R: DeserializeOwned>( &self, request: T0, ) -> Result<R, OpenAIError>
Create a container.
Sourcepub async fn list(&self) -> Result<ContainerListResource, OpenAIError>
pub async fn list(&self) -> Result<ContainerListResource, OpenAIError>
List containers. List containers.
Sourcepub async fn list_byot<R: DeserializeOwned>(&self) -> Result<R, OpenAIError>
pub async fn list_byot<R: DeserializeOwned>(&self) -> Result<R, OpenAIError>
List containers.
Sourcepub async fn retrieve(
&self,
container_id: &str,
) -> Result<ContainerResource, OpenAIError>
pub async fn retrieve( &self, container_id: &str, ) -> Result<ContainerResource, OpenAIError>
Retrieve a container. Retrieve a container.
Sourcepub async fn retrieve_byot<T0: Display, R: DeserializeOwned>(
&self,
container_id: T0,
) -> Result<R, OpenAIError>
pub async fn retrieve_byot<T0: Display, R: DeserializeOwned>( &self, container_id: T0, ) -> Result<R, OpenAIError>
Retrieve a container.
Sourcepub async fn delete(
&self,
container_id: &str,
) -> Result<DeleteContainerResponse, OpenAIError>
pub async fn delete( &self, container_id: &str, ) -> Result<DeleteContainerResponse, OpenAIError>
Delete a container. Delete a container.
Sourcepub async fn delete_byot<T0: Display, R: DeserializeOwned>(
&self,
container_id: T0,
) -> Result<R, OpenAIError>
pub async fn delete_byot<T0: Display, R: DeserializeOwned>( &self, container_id: T0, ) -> Result<R, OpenAIError>
Delete a container.
Trait Implementations§
Source§impl<'c, C: Config> RequestOptionsBuilder for Containers<'c, C>
Available on crate feature _api only.
impl<'c, C: Config> RequestOptionsBuilder for Containers<'c, C>
Available on crate feature
_api only.Source§fn options_mut(&mut self) -> &mut RequestOptions
fn options_mut(&mut self) -> &mut RequestOptions
Get mutable reference to RequestOptions (for building)
Source§fn options(&self) -> &RequestOptions
fn options(&self) -> &RequestOptions
Get reference to RequestOptions
Source§fn header<K, V>(self, key: K, value: V) -> Result<Self, OpenAIError>
fn header<K, V>(self, key: K, value: V) -> Result<Self, OpenAIError>
Add a single header to RequestOptions
Auto Trait Implementations§
impl<'c, C> Freeze for Containers<'c, C>
impl<'c, C> !RefUnwindSafe for Containers<'c, C>
impl<'c, C> Send for Containers<'c, C>
impl<'c, C> Sync for Containers<'c, C>
impl<'c, C> Unpin for Containers<'c, C>
impl<'c, C> !UnwindSafe for Containers<'c, C>
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