[][src]Struct ieql::query::query::Query

pub struct Query {
    pub response: Response,
    pub scope: Scope,
    pub threshold: Threshold,
    pub triggers: Vec<Trigger>,
    pub id: Option<String>,
}

Query represents an uncompiled query. This type is typically interstitial; it cannot perform scans, and has little functionality apart from its ability to compile into a CompiledQuery.

This type is part of the public API, and therefore must comply with the structure defined in the specification.

Fields

response: Response

Represents the desired Response of the query when it matches Documents. In other words, this is the set of parameters for the Output.

For more information, see the Response documentation.

scope: Scope

Represents the documents and content that the query is applicable to. The Scope allows users to specify which URLs their query is applicable to, as well as the type of content—Text or Raw—that should be passed to the triggers.

For more information, see the Scope documentation.

threshold: Threshold

Represents the composition of trigger matches necessary in order for a match to be made.

For more information, see the Threshold documentation.

triggers: Vec<Trigger>

Represents the Triggers that will be checked against the document and then processed by the Threshold in order to determine whether a match is made.

For more information, see the Trigger documentation.

id: Option<String>

Represents the id of the query. This field is optional but highly recommended, as it will be copied to the outputs created by this query.

Trait Implementations

impl Validatable for Query[src]

fn validate(&self) -> Option<Vec<Issue>>[src]

Validates the query, as well as all of its sub-components.

While this is an important mechanism for proper validation (note that some invalid queries will still compile), one should always double-check the results by actually compiling the query and performing a test scan.

impl CompilableTo<CompiledQuery> for Query[src]

fn compile(&self) -> Result<CompiledQuery, Issue>[src]

Compiles the Query into a CompiledQuery. Like all compilation operations, this is expensive.

impl PartialEq<Query> for Query[src]

impl Debug for Query[src]

impl Serialize for Query[src]

impl<'de> Deserialize<'de> for Query[src]

Auto Trait Implementations

impl Send for Query

impl Sync for Query

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

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