#[non_exhaustive]
pub enum ContextReference {
Named(String),
ByScope {
scope: Scope,
sub_context: Option<String>,
with_escape: bool,
},
File {
name: String,
sub_context: Option<String>,
with_escape: bool,
},
Inline(String),
Direct(ContextId),
}
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.
Named(String)
ByScope
Fields
This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
File
Fields
This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
§
with_escape: bool
Same semantics as for Self::ByScope::with_escape
.
Inline(String)
Direct(ContextId)
Implementations§
Trait Implementations§
source§impl Clone for ContextReference
impl Clone for ContextReference
source§fn clone(&self) -> ContextReference
fn clone(&self) -> ContextReference
Returns a copy 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 ContextReference
impl Debug for ContextReference
source§impl<'de> Deserialize<'de> for ContextReference
impl<'de> Deserialize<'de> for ContextReference
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<ContextReference> for ContextReference
impl PartialEq<ContextReference> for ContextReference
source§fn eq(&self, other: &ContextReference) -> bool
fn eq(&self, other: &ContextReference) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for ContextReference
impl Serialize for ContextReference
impl Eq for ContextReference
impl StructuralEq for ContextReference
impl StructuralPartialEq for ContextReference
Auto Trait Implementations§
impl RefUnwindSafe for ContextReference
impl Send for ContextReference
impl Sync for ContextReference
impl Unpin for ContextReference
impl UnwindSafe for ContextReference
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.