pub struct CachedContentHandle {
pub name: String,
/* private fields */
}
Expand description
Represents a cached content resource, providing methods to manage its lifecycle.
A CachedContentHandle
object is a handle to a cached content resource on the Gemini API.
It allows you to retrieve, update, or delete the cached content.
Fields§
§name: String
The unique resource name of the cached content, e.g., cachedContents/cache-xxxxxxxx
.
Implementations§
Source§impl CachedContentHandle
impl CachedContentHandle
Sourcepub async fn get(&self) -> Result<CachedContent, Error>
pub async fn get(&self) -> Result<CachedContent, Error>
Retrieves the cached content configuration by making an API call.
Sourcepub async fn update(
&self,
expiration: CacheExpirationRequest,
) -> Result<CachedContent, Error>
pub async fn update( &self, expiration: CacheExpirationRequest, ) -> Result<CachedContent, Error>
Updates the cached content configuration (typically the TTL).
Auto Trait Implementations§
impl Freeze for CachedContentHandle
impl !RefUnwindSafe for CachedContentHandle
impl Send for CachedContentHandle
impl Sync for CachedContentHandle
impl Unpin for CachedContentHandle
impl !UnwindSafe for CachedContentHandle
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