[][src]Struct ieql::scan::scanner::AsyncScanInterface

pub struct AsyncScanInterface { /* fields omitted */ }

AsyncScanInterface provides a simple interface, free of channels and other complicated components, to communicate with the scan engine.

Methods

impl AsyncScanInterface[src]

pub fn process(&self, batch: DocumentReferenceBatch) -> Result<(), ()>[src]

Process the given documents. Note that this will temporarily lock the thread in order to increment the number of items processing.

pub fn lock_for_outputs(&self) -> Result<OutputBatch, RecvError>[src]

Lock the current thread and wait for outputs.

pub fn batches_pending_processing(&self) -> isize[src]

Lock the current thread and determine the total number of batches that are currently processing (i.e. the total size of the current inter-thread queue).

pub fn outputs(&self) -> Vec<OutputBatch>[src]

Retrieve the current outputs, if available. This will never lock the calling thread. Note that once outputs are received, they are no longer present in the AsyncScanInterface. Keep them somewhere safe!

pub fn shutdown(&mut self)[src]

Signal to the scan engine to shut down. Sending documents will no longer be possible.

Auto Trait Implementations

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]