Skip to main content

Module events

Module events 

Source
Expand description

Event system for client operations.

This module provides event types and handlers for observing and reacting to client operations (indexing, querying, etc.).

§Example

let emitter = EventEmitter::new()
    .on_index(|e| match e {
        IndexEvent::Complete { doc_id } => println!("Indexed: {}", doc_id),
        _ => {}
    });

let client = EngineBuilder::new()
    .with_events(emitter)
    .build()?;

Structs§

EventEmitter
Event emitter for client operations.

Enums§

Event
Event types for client operations.
IndexEvent
Indexing operation events.
QueryEvent
Query operation events.
WorkspaceEvent
Workspace operation events.

Traits§

AsyncEventHandler
Async event handler trait.
EventHandler
Sync event handler trait.

Type Aliases§

IndexHandler
Type alias for sync index handler.
QueryHandler
Type alias for sync query handler.
WorkspaceHandler
Type alias for sync workspace handler.