pub struct Cache<'a> { /* private fields */ }Expand description
Cache identifier.
Implementations§
Source§impl<'a> Cache<'a>
impl<'a> Cache<'a>
Sourcepub fn builder(
cache_id: impl Into<CacheId<'a>>,
security_origin: impl Into<Cow<'a, str>>,
storage_key: impl Into<Cow<'a, str>>,
cache_name: impl Into<Cow<'a, str>>,
) -> CacheBuilder<'a>
pub fn builder( cache_id: impl Into<CacheId<'a>>, security_origin: impl Into<Cow<'a, str>>, storage_key: impl Into<Cow<'a, str>>, cache_name: impl Into<Cow<'a, str>>, ) -> CacheBuilder<'a>
Creates a builder for this type with the required parameters:
cache_id: An opaque unique id of the cache.security_origin: Security origin of the cache.storage_key: Storage key of the cache.cache_name: The name of the cache.
Sourcepub fn security_origin(&self) -> &str
pub fn security_origin(&self) -> &str
Security origin of the cache.
Sourcepub fn storage_key(&self) -> &str
pub fn storage_key(&self) -> &str
Storage key of the cache.
Sourcepub fn storage_bucket(&self) -> Option<&StorageBucket<'a>>
pub fn storage_bucket(&self) -> Option<&StorageBucket<'a>>
Storage bucket of the cache.
Sourcepub fn cache_name(&self) -> &str
pub fn cache_name(&self) -> &str
The name of the cache.
Trait Implementations§
Source§impl<'de, 'a> Deserialize<'de> for Cache<'a>
impl<'de, 'a> Deserialize<'de> for Cache<'a>
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl<'a> Freeze for Cache<'a>
impl<'a> RefUnwindSafe for Cache<'a>
impl<'a> Send for Cache<'a>
impl<'a> Sync for Cache<'a>
impl<'a> Unpin for Cache<'a>
impl<'a> UnsafeUnpin for Cache<'a>
impl<'a> UnwindSafe for Cache<'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