#[non_exhaustive]pub enum CacheScope {
Session,
Global,
}Expand description
Scope of a cached list result.
Per SEP-2549, servers can hint to clients how widely they may share a
cached tools/list, resources/list, etc. response. Session means
the cache is valid for the current client only; Global means it
applies to any client of this server. None on the parent field
means the server expresses no opinion.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Session
Cache is valid for the current session only.
Global
Cache is valid across sessions (per-server, not per-client).
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 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for CacheScope
Source§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<CacheScope, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<CacheScope, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for CacheScope
Source§impl PartialEq for CacheScope
impl PartialEq for CacheScope
Source§fn eq(&self, other: &CacheScope) -> bool
fn eq(&self, other: &CacheScope) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for CacheScope
impl Serialize for CacheScope
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
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