pub enum ContextType {
DataSnapshot,
Analysis,
Prediction,
Alert,
Custom(String),
}Expand description
Registered context types plus open-ended custom namespace.
Wire form is a single string. Standard values (data_snapshot,
analysis, prediction, alert) deserialize to the named variants;
any other value MUST be a namespaced custom type matching
^[a-z][a-z0-9_]*:[a-z][a-z0-9_-]*$ (e.g. finance:portfolio_snapshot)
per acdp-common.schema.json#/$defs/context_type. Inputs that match
neither are rejected at deserialization time so the type cannot encode
schema-invalid context types.
Variants§
DataSnapshot
data_snapshot — point-in-time data.
Analysis
analysis.
Prediction
prediction.
Alert
alert.
Custom(String)
Namespaced custom type, e.g. finance:portfolio_snapshot.
MUST match ^[a-z][a-z0-9_]*:[a-z][a-z0-9_-]*$.
Trait Implementations§
Source§impl Clone for ContextType
impl Clone for ContextType
Source§fn clone(&self) -> ContextType
fn clone(&self) -> ContextType
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 moreSource§impl Debug for ContextType
impl Debug for ContextType
Source§impl<'de> Deserialize<'de> for ContextType
impl<'de> Deserialize<'de> for ContextType
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ContextType
Source§impl PartialEq for ContextType
impl PartialEq for ContextType
Source§fn eq(&self, other: &ContextType) -> bool
fn eq(&self, other: &ContextType) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ContextType
impl Serialize for ContextType
impl StructuralPartialEq for ContextType
Auto Trait Implementations§
impl Freeze for ContextType
impl RefUnwindSafe for ContextType
impl Send for ContextType
impl Sync for ContextType
impl Unpin for ContextType
impl UnsafeUnpin for ContextType
impl UnwindSafe for ContextType
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.