mars-protocol · marsql::evaluator
Public declarations and documentation for mars-protocol::marsql::evaluator.
Package: mars-protocol · Workspace version: 0.1.0 · Module: marsql::evaluator
This reference follows declared modules and public syntax, including public implementation methods. Function bodies and constant values are omitted. Feature conditions are retained. Private-module re-exports and trait resolution require the compiler; not every declaration is a root import.
marsql::evaluator::MarsQueryResult
The result of executing a MARS-QL query against a set of entries.
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
#[cfg_attr(feature = "contracts", derive(schemars::JsonSchema, utoipa::ToSchema))]
#[serde(rename_all = "camelCase")]
pub struct MarsQueryResult {
/// The matching entries (after filtering, sorting, and pagination).
pub entries: Vec<MarsEntry>,
/// Total number of entries that matched the filter (before pagination).
pub total_count: u64,
/// Opaque cursor for the next page, if applicable.
#[serde(skip_serializing_if = "Option::is_none")]
pub cursor: Option<String>,
/// Whether more results exist beyond this page.
pub has_more: bool
}Source line: 21.
marsql::evaluator::evaluate_condition
Evaluate a single condition against a [MarsEntry].
Returns true if the entry satisfies the condition.
pub fn evaluate_condition(entry: &MarsEntry, condition: &Condition) -> bool;Source line: 40.
marsql::evaluator::matches_query
Evaluate all conditions of a query against a [MarsEntry] (AND logic).
Returns true if the entry matches all conditions and the entry type
matches the query's entry type filter.
pub fn matches_query(entry: &MarsEntry, query: &MarsQuery) -> bool;Source line: 78.
Source provenance
Source: mars-protocol/src/marsql/evaluator.rs · SHA-256 4469a49ac5a125480877b8db7b7ef53df8af92424c1d5520b38cbf7ace2baeb9. Package overview.