pub struct Sessions<'a> { /* private fields */ }Available on crate feature
managed-agents-preview only.Expand description
Namespace handle for the Sessions API.
Obtained via Client::managed_agents.
Implementations§
Source§impl<'a> Sessions<'a>
impl<'a> Sessions<'a>
Sourcepub async fn create(&self, request: CreateSessionRequest) -> Result<Session>
pub async fn create(&self, request: CreateSessionRequest) -> Result<Session>
Create a session. Returns the freshly-provisioned Session.
Sourcepub async fn list(
&self,
params: ListSessionsParams,
) -> Result<Paginated<Session>>
pub async fn list( &self, params: ListSessionsParams, ) -> Result<Paginated<Session>>
List sessions, paginated.
Sourcepub async fn update(
&self,
session_id: &str,
request: UpdateSessionRequest,
) -> Result<Session>
pub async fn update( &self, session_id: &str, request: UpdateSessionRequest, ) -> Result<Session>
Update a session. All fields on UpdateSessionRequest are
optional with merge-patch semantics: omit a field to preserve
its current value.
Sourcepub async fn archive(&self, session_id: &str) -> Result<Session>
pub async fn archive(&self, session_id: &str) -> Result<Session>
Archive a session. Archived sessions cannot accept new events but preserve their event history.
Sourcepub fn events(&self, session_id: impl Into<String>) -> Events<'_>
pub fn events(&self, session_id: impl Into<String>) -> Events<'_>
Sub-namespace for the session-events API
(/v1/sessions/{id}/events and the SSE stream).
Sourcepub fn resources(&self, session_id: impl Into<String>) -> Resources<'_>
pub fn resources(&self, session_id: impl Into<String>) -> Resources<'_>
Sub-namespace for resource operations on a session
(/v1/sessions/{id}/resources).
Auto Trait Implementations§
impl<'a> Freeze for Sessions<'a>
impl<'a> !RefUnwindSafe for Sessions<'a>
impl<'a> Send for Sessions<'a>
impl<'a> Sync for Sessions<'a>
impl<'a> Unpin for Sessions<'a>
impl<'a> UnsafeUnpin for Sessions<'a>
impl<'a> !UnwindSafe for Sessions<'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.