pub enum ClickStackSourceResponse {
ClickStackLogSource(ClickStackLogSourceResponse),
ClickStackTraceSource(ClickStackTraceSourceResponse),
ClickStackMetricSource(ClickStackMetricSourceResponse),
ClickStackSessionSource(ClickStackSessionSourceResponse),
ClickStackPromqlSource(ClickStackPromqlSourceResponse),
Unknown(Value),
}Expand description
ClickStackSource - one of multiple variants, in response position.
Response variant of ClickStackSource: each arm is the all-Option
response variant of its request struct, so a field the API drops or sends as
null deserializes to None instead of failing.
Dispatched on the kind field, exactly as the request union is: dispatch
reads the raw JSON rather than trying each variant’s shape, so all-Option
arms — which would match any object under untagged matching — cannot
misroute a payload. A kind this crate does not know, or a payload that does
not fit the variant its kind selects, lands in Unknown with the raw JSON
intact.
Deliberately has no Default: every arm’s default would serialize to {},
which carries no kind and so would not deserialize back to the same
variant. Build a ClickStackSource instead when writing.
Variants§
ClickStackLogSource(ClickStackLogSourceResponse)
ClickStackTraceSource(ClickStackTraceSourceResponse)
ClickStackMetricSource(ClickStackMetricSourceResponse)
ClickStackSessionSource(ClickStackSessionSourceResponse)
ClickStackPromqlSource(ClickStackPromqlSourceResponse)
Unknown(Value)
Catch-all for unknown or newly-added values.
Holds the raw payload as serde_json::Value so it round-trips
losslessly; its Display emits the payload as compact JSON.
Trait Implementations§
Source§impl Clone for ClickStackSourceResponse
impl Clone for ClickStackSourceResponse
Source§fn clone(&self) -> ClickStackSourceResponse
fn clone(&self) -> ClickStackSourceResponse
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ClickStackSourceResponse
impl Debug for ClickStackSourceResponse
Source§impl<'de> Deserialize<'de> for ClickStackSourceResponse
impl<'de> Deserialize<'de> for ClickStackSourceResponse
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>,
Source§impl Display for ClickStackSourceResponse
impl Display for ClickStackSourceResponse
Source§impl PartialEq for ClickStackSourceResponse
impl PartialEq for ClickStackSourceResponse
Source§impl Serialize for ClickStackSourceResponse
impl Serialize for ClickStackSourceResponse
impl StructuralPartialEq for ClickStackSourceResponse
Source§impl TryFrom<ClickStackSourceResponse> for ClickStackSource
impl TryFrom<ClickStackSourceResponse> for ClickStackSource
Source§fn try_from(value: ClickStackSourceResponse) -> Result<Self, Self::Error>
fn try_from(value: ClickStackSourceResponse) -> Result<Self, Self::Error>
Turns a fetched source into a create/update body.
A write replaces the whole source, so every field the schema requires for
the source’s kind has to be present in the response; a missing one is
named rather than invented. Nested objects report their own wire names,
unprefixed — databaseName for a source’s from, say.
An Unknown payload — a kind this crate does not model, or a body that
did not fit the variant its kind selected — converts losslessly: the
request union’s own Unknown arm holds the raw JSON and serializes it
verbatim, so such a source can still be written back.