pub struct SyncAuditAdapter<S>(pub Arc<S>);Available on crate feature
async only.Expand description
Adapts any synchronous AuditSink to the AsyncAuditSink interface
by calling emit directly (no spawn). Appropriate when the underlying
sink is non-blocking (e.g., an mpsc channel send).
Tuple Fields§
§0: Arc<S>Trait Implementations§
Source§impl<S: AuditSink + 'static> AsyncAuditSink for SyncAuditAdapter<S>
impl<S: AuditSink + 'static> AsyncAuditSink for SyncAuditAdapter<S>
fn emit_async<'life0, 'async_trait>(
&'life0 self,
event: AuditEvent,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Auto Trait Implementations§
impl<S> Freeze for SyncAuditAdapter<S>
impl<S> RefUnwindSafe for SyncAuditAdapter<S>where
S: RefUnwindSafe,
impl<S> Send for SyncAuditAdapter<S>
impl<S> Sync for SyncAuditAdapter<S>
impl<S> Unpin for SyncAuditAdapter<S>
impl<S> UnsafeUnpin for SyncAuditAdapter<S>
impl<S> UnwindSafe for SyncAuditAdapter<S>where
S: RefUnwindSafe,
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