pub struct AsyncEngine { /* private fields */ }
Expand description
Provides the core engine functionality with an async interface.
Internally this wraps a SyncEngine
in a thread and coordinates with it via
message passing.
Implementations§
Source§impl AsyncEngine
impl AsyncEngine
pub fn new<S: Storage + Send + 'static>( storage: S, ) -> Result<AsyncEngine, AnyError>
pub async fn query_span( &self, query: Query, ) -> Result<Vec<ComposedSpan>, AnyError>
pub async fn query_span_count(&self, query: Query) -> Result<usize, AnyError>
pub async fn query_event( &self, query: Query, ) -> Result<Vec<ComposedEvent>, AnyError>
pub async fn query_event_count(&self, query: Query) -> Result<usize, AnyError>
pub async fn query_stats(&self) -> Result<DatasetStats, AnyError>
pub async fn insert_resource( &self, resource: NewResource, ) -> OneshotReceiver<Result<ResourceKey, AnyError>>
pub async fn disconnect_tracing_instance( &self, id: InstanceId, ) -> OneshotReceiver<Result<(), AnyError>>
pub async fn insert_span_event( &self, span_event: NewSpanEvent, ) -> OneshotReceiver<Result<SpanKey, AnyError>>
pub async fn insert_event( &self, event: NewEvent, ) -> OneshotReceiver<Result<(), AnyError>>
pub async fn delete( &self, filter: DeleteFilter, ) -> Result<DeleteMetrics, AnyError>
pub async fn subscribe_to_spans( &self, filter: Vec<FilterPredicate>, ) -> Result<(SubscriptionId, UnboundedReceiver<SubscriptionResponse<ComposedSpan>>), AnyError>
pub async fn unsubscribe_from_spans( &self, id: SubscriptionId, ) -> Result<(), AnyError>
pub async fn subscribe_to_events( &self, filter: Vec<FilterPredicate>, ) -> Result<(SubscriptionId, UnboundedReceiver<SubscriptionResponse<ComposedEvent>>), AnyError>
pub async fn unsubscribe_from_events( &self, id: SubscriptionId, ) -> Result<(), AnyError>
pub async fn copy_dataset( &self, to: Box<dyn Storage + Send>, ) -> Result<(), AnyError>
pub async fn get_status(&self) -> Result<EngineStatus, AnyError>
pub async fn shutdown(&self) -> Result<(), AnyError>
Trait Implementations§
Source§impl Clone for AsyncEngine
impl Clone for AsyncEngine
Source§fn clone(&self) -> AsyncEngine
fn clone(&self) -> AsyncEngine
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for AsyncEngine
impl RefUnwindSafe for AsyncEngine
impl Send for AsyncEngine
impl Sync for AsyncEngine
impl Unpin for AsyncEngine
impl UnwindSafe for AsyncEngine
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more