Struct exar::Query [] [src]

pub struct Query {
    pub live_stream: bool,
    pub offset: u64,
    pub limit: Option<u64>,
    pub tag: Option<String>,
    // some fields omitted
}

Exar DB's subscription query.

Examples

extern crate exar;

use exar::*;

let query = Query::new(true, 100, Some(20), Some("tag".to_owned()));
 
// or using the fluent API
let fluent_query = Query::live().offset(100).limit(20).by_tag("tag");

Fields

Indicates wether the query targets real-time events.

Indicates the query target offset.

Indicates the maximum number of events to be returned by the query, if specified.

Indicates the query target event tag, if specified.

Methods

impl Query
[src]

Creates a new Query from the given parameters.

Initializes a Query targeting the current events in the event log.

Initializes a Query targeting the current and real-time events in the event log.

Mutates and returns the query by updating its target offset.

Mutates and returns the query by updating its limit.

Mutates and returns the query by updating its target event tag.

Returns wether a given Event matches the query.

Returns wether the query is still active.

Updates the internal state of the query given the last matching event id.

Returns the offsets interval the query targets.

Trait Implementations

impl Clone for Query
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for Query
[src]

Formats the value using the given formatter.

impl PartialEq for Query
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Eq for Query
[src]