pub trait DBListenerTrait {
// Required methods
fn start<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(Arc<Mutex<Receiver<Value>>>, JoinHandle<()>), DBListenerError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn stop<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), DBListenerError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Trait defining a generic database listener.
Required Methods§
Sourcefn start<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(Arc<Mutex<Receiver<Value>>>, JoinHandle<()>), DBListenerError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn start<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(Arc<Mutex<Receiver<Value>>>, JoinHandle<()>), DBListenerError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Starts the listener and returns a receiver channel for event notifications.
§Returns
A Result containing a tuple of an Arc<Mutex<Receiver<Value>>> and a JoinHandle<()>,
or an error if the listener fails to start.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".