[][src]Struct ieql::input::document::CompiledDocument

pub struct CompiledDocument {
    pub url: Option<String>,
    pub raw: String,
    pub mime: Option<String>,
    pub text: String,
    pub domain: Option<String>,
}

A CompiledDocument is a Document that has been processed and is ready to be scanned. During compilation, the IEQL document compiler extracts the following information from the Document:

  • text — the text of the document. Currently, only HTML parsing is supported.
  • domain — the domain name, if present, is also processed.
  • raw — unlike Documents, whose contents are bytes, CompiledDocuments have text.

In cases that the document is not HTML, text is identical to raw.

Fields

url: Option<String>raw: Stringmime: Option<String>text: Stringdomain: Option<String>

Methods

impl CompiledDocument
[src]

pub fn content(&self, content: ScopeContent) -> &String
[src]

This function returns the document content relative to the given ScopeContent. For example, if the ScopeContent is Raw, this function will return the document's Raw data. If it is Text, this function will return the document's parsed text.

Trait Implementations

impl CompilableTo<CompiledDocument> for Document
[src]

Auto Trait Implementations

Blanket Implementations

impl<T> From for T
[src]

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

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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