pub struct CacheScope { /* private fields */ }Implementations§
Source§impl CacheScope
impl CacheScope
pub fn public() -> Self
pub fn private() -> Self
pub fn no_store() -> Self
pub fn new(visibility: CacheVisibility) -> Self
pub fn visibility(&self) -> CacheVisibility
pub fn tenant(&self) -> Option<&str>
pub fn site(&self) -> Option<&str>
pub fn locale(&self) -> Option<&str>
pub fn user(&self) -> Option<&str>
pub fn session(&self) -> Option<&str>
pub fn custom(&self) -> &BTreeMap<String, String>
pub fn with_tenant( self, tenant: impl Into<String>, ) -> Result<Self, CacheModelError>
pub fn with_site(self, site: impl Into<String>) -> Result<Self, CacheModelError>
pub fn with_locale( self, locale: impl Into<String>, ) -> Result<Self, CacheModelError>
pub fn with_user(self, user: impl Into<String>) -> Result<Self, CacheModelError>
pub fn with_session( self, session: impl Into<String>, ) -> Result<Self, CacheModelError>
pub fn with_custom_variation( self, name: impl Into<String>, value: impl Into<String>, ) -> Result<Self, CacheModelError>
pub fn is_cacheable(&self) -> bool
pub fn is_edge_cacheable(&self) -> bool
pub fn variation_key(&self) -> Option<VariationKey>
pub fn cache_partition_key(&self) -> Option<VariationKey>
Trait Implementations§
Source§impl Clone for CacheScope
impl Clone for CacheScope
Source§fn clone(&self) -> CacheScope
fn clone(&self) -> CacheScope
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CacheScope
impl Debug for CacheScope
Source§impl<'de> Deserialize<'de> for CacheScope
impl<'de> Deserialize<'de> for CacheScope
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
Source§impl PartialEq for CacheScope
impl PartialEq for CacheScope
Source§impl Serialize for CacheScope
impl Serialize for CacheScope
impl Eq for CacheScope
impl StructuralPartialEq for CacheScope
Auto Trait Implementations§
impl Freeze for CacheScope
impl RefUnwindSafe for CacheScope
impl Send for CacheScope
impl Sync for CacheScope
impl Unpin for CacheScope
impl UnsafeUnpin for CacheScope
impl UnwindSafe for CacheScope
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