pub struct Environments<'a> { /* private fields */ }Available on crate feature
managed-agents-preview only.Expand description
Namespace handle for the Environments API.
Implementations§
Source§impl<'a> Environments<'a>
impl<'a> Environments<'a>
Sourcepub async fn create(
&self,
request: CreateEnvironmentRequest,
) -> Result<Environment>
pub async fn create( &self, request: CreateEnvironmentRequest, ) -> Result<Environment>
POST /v1/environments.
Sourcepub async fn retrieve(&self, environment_id: &str) -> Result<Environment>
pub async fn retrieve(&self, environment_id: &str) -> Result<Environment>
GET /v1/environments/{id}.
Sourcepub async fn list(
&self,
params: ListEnvironmentsParams,
) -> Result<Paginated<Environment>>
pub async fn list( &self, params: ListEnvironmentsParams, ) -> Result<Paginated<Environment>>
GET /v1/environments.
Sourcepub async fn update(
&self,
environment_id: &str,
request: UpdateEnvironmentRequest,
) -> Result<Environment>
pub async fn update( &self, environment_id: &str, request: UpdateEnvironmentRequest, ) -> Result<Environment>
POST /v1/environments/{id}. Update an environment with
merge-patch semantics; omitted fields are preserved.
Sourcepub async fn archive(&self, environment_id: &str) -> Result<Environment>
pub async fn archive(&self, environment_id: &str) -> Result<Environment>
POST /v1/environments/{id}/archive. Read-only after archive;
existing sessions continue.
Auto Trait Implementations§
impl<'a> Freeze for Environments<'a>
impl<'a> !RefUnwindSafe for Environments<'a>
impl<'a> Send for Environments<'a>
impl<'a> Sync for Environments<'a>
impl<'a> Unpin for Environments<'a>
impl<'a> UnsafeUnpin for Environments<'a>
impl<'a> !UnwindSafe for Environments<'a>
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.