pub struct TraverseSpec {
pub path: Option<String>,
pub on_missing: OnMissing,
}Expand description
traverse: — knobs on the result-traversal layer.
The layer itself is always installed (result: and metrics: declare it
as requires_inner, and the composition resolver enforces that at init),
so this block only tunes behaviour that is otherwise fixed.
Fields§
§path: Option<String>Base JSON Pointer (RFC 6901) applied to the result body BEFORE any capture is resolved, re-rooting the document.
Every capture otherwise repeats the same prefix — /value/0/x,
/value/0/y — which is the shape envelope responses force
({value, status, …}). poll.json_path already exists for exactly
this reason on exactly this data; this is the same idea for captures.
on_missing: OnMissingWhat to do when a declared capture resolves to nothing.
Trait Implementations§
Source§impl Clone for TraverseSpec
impl Clone for TraverseSpec
Source§impl Debug for TraverseSpec
impl Debug for TraverseSpec
Source§impl<'de> Deserialize<'de> for TraverseSpec
impl<'de> Deserialize<'de> for TraverseSpec
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
impl Eq for TraverseSpec
Source§impl PartialEq for TraverseSpec
impl PartialEq for TraverseSpec
Source§impl Serialize for TraverseSpec
impl Serialize for TraverseSpec
impl StructuralPartialEq for TraverseSpec
Auto Trait Implementations§
impl Freeze for TraverseSpec
impl RefUnwindSafe for TraverseSpec
impl Send for TraverseSpec
impl Sync for TraverseSpec
impl Unpin for TraverseSpec
impl UnsafeUnpin for TraverseSpec
impl UnwindSafe for TraverseSpec
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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.