[][src]Struct ieql::output::output::Output

pub struct Output {
    pub items: Vec<OutputItem>,
    pub kind: OutputKind,
    pub id: Option<String>,
    pub query_id: Option<String>,
}

Output represents a 'match' of a Query. It is the primary product of an IEQL scan, and contains many variable (and configurable) pieces of data and metadata.

Note: response and output are synonymous in the context of this documentation.

Outputs have two kinds: Full and Partial. Full outputs are for matches which exist on their own—for example, a match of someone's name online. Partial outputs, however, are meant to be MapReduced. For example, if a linguist wanted to count the number of times a certain word appears online, they would configure their query to produce a Partial response, which they would then MapReduce.

There is not currently full support for partial IEQL outputs.

Fields

items: Vec<OutputItem>

Contains the data relevant for the user; for example, excerpts of the match.

kind: OutputKind

Represents the kind of the output (Full or Partial).

id: Option<String>

This is an optional value for identifying the output, and can vary based on your implementation. In most cases, when present, this is some form of UUID.

query_id: Option<String>

This is the ID of the query that created the output. Note that this will only be present when the query that created the output itself has an id.

Methods

impl Output[src]

pub fn new(
    document: &CompiledDocument,
    query: &CompiledQuery,
    matches: Vec<PatternMatch>,
    id: Option<String>
) -> Output
[src]

Create a new output from the given data. Please note that this operation is expensive!

Arguments

  • document: the compiled document that the query matched
  • query: the compiled query that matched the document
  • matches: the PatternMatches produced by the queries' triggers
  • id: the optional ID of the desired output

Trait Implementations

impl Debug for Output[src]

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

impl Display for Output[src]

impl PartialEq<Output> for Output[src]

impl Serialize for Output[src]

impl StructuralPartialEq for Output[src]

Auto Trait Implementations

impl RefUnwindSafe for Output

impl Send for Output

impl Sync for Output

impl Unpin for Output

impl UnwindSafe for Output

Blanket Implementations

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

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

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

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

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

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

impl<T> ToString for T where
    T: Display + ?Sized
[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<V, T> VZip<V> for T where
    V: MultiLane<T>,