Skip to main content

CapturePoint

Struct CapturePoint 

Source
pub struct CapturePoint {
    pub source_name: String,
    pub as_name: String,
    pub cast_type: Option<String>,
    pub slurp: bool,
    pub path: Option<String>,
    pub count: bool,
    pub agg: Option<CaptureAgg>,
    pub row_filter: Option<(String, String)>,
}

Fields§

§source_name: String

The field name to capture from the result.

§as_name: String

The variable name to store the captured value under. Same as source_name if no as clause.

§cast_type: Option<String>

Optional type assertion (e.g., “List”, “int[]”).

§slurp: bool

true when the capture-point was declared with the @ slurp prefix ([@name]). Slurp captures collect every row’s column value across the result body into a single Value::Json array; non-slurp captures take the first row’s value as a scalar.

§path: Option<String>

Optional JSON-Pointer path (RFC 6901, e.g. /0/value, /value/inner/0). When Some, the extractor uses serde_json::Value::pointer(path) against the body’s to_json() projection rather than the first-row / top-level field lookup keyed by source_name. Lets a declarative capture: map address Jolokia bulk-POST responses ([{value:N}, {value:[...]}, ...]) by position + nested field.

The bracket-syntax in op text (e.g. [name]) leaves this None and continues to use the original first-row extraction path; only the declarative capture: block populates it.

§count: bool

Reduce the extracted sub-tree to a u64 count instead of capturing it as-is. Array → length; object → key count; scalar (number / bool / non-empty string) → 1; null / missing → 0. Useful for “is the compactions list empty” style predicates without binding the array into the kernel as a Value::Json. Only honoured when path is also set (declarative capture form).

§agg: Option<CaptureAgg>

Row-set aggregation (:min(f) / :max(f) / :sum(f) path suffix): fold the named field across the rows of the addressed array instead of capturing a single value. Like count, only honoured on the declarative capture form.

§row_filter: Option<(String, String)>

Row predicate for an aggregate: (field, value), from the where <field>='<value>' clause of a capture suffix — e.g. ":sum(progress where kind='secondary index build')". Rows whose field does not equal value are excluded before folding.

Exists because a result set can hold rows that are not commensurable. system_views.sstable_tasks lists a data compaction reporting unit=bytes beside a vector index build reporting unit=token range parts; summing across them adds unlike quantities, and the total silently depends on how many tasks were registered at sample time. The predicate cannot live in the query — Cassandra allows GROUP BY only on PRIMARY KEY columns, and narrowing the poll’s own WHERE would change which rows the drain waits for.

Trait Implementations§

Source§

impl Clone for CapturePoint

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CapturePoint

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for CapturePoint

Source§

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 for CapturePoint

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for CapturePoint

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for CapturePoint

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.