pub struct Resources<'a> { /* private fields */ }Available on crate feature
managed-agents-preview only.Expand description
Namespace handle for resource operations on a single session.
Obtained via
Sessions::resources.
Implementations§
Source§impl Resources<'_>
impl Resources<'_>
Sourcepub async fn list(&self) -> Result<Paginated<SessionResource>>
pub async fn list(&self) -> Result<Paginated<SessionResource>>
GET /v1/sessions/{session_id}/resources.
Sourcepub async fn retrieve(&self, resource_id: &str) -> Result<SessionResource>
pub async fn retrieve(&self, resource_id: &str) -> Result<SessionResource>
GET /v1/sessions/{session_id}/resources/{resource_id}. Fetch a
single mounted resource by ID.
Sourcepub async fn add(&self, resource: &SessionResource) -> Result<SessionResource>
pub async fn add(&self, resource: &SessionResource) -> Result<SessionResource>
POST /v1/sessions/{session_id}/resources. Add a resource to a
running session.
Sourcepub async fn update(
&self,
resource_id: &str,
request: UpdateResourceRequest,
) -> Result<SessionResource>
pub async fn update( &self, resource_id: &str, request: UpdateResourceRequest, ) -> Result<SessionResource>
POST /v1/sessions/{session_id}/resources/{resource_id}. Used
to rotate a github_repository resource’s authorization_token.
Auto Trait Implementations§
impl<'a> Freeze for Resources<'a>
impl<'a> !RefUnwindSafe for Resources<'a>
impl<'a> Send for Resources<'a>
impl<'a> Sync for Resources<'a>
impl<'a> Unpin for Resources<'a>
impl<'a> UnsafeUnpin for Resources<'a>
impl<'a> !UnwindSafe for Resources<'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.