pub struct FlushGuard { /* private fields */ }Expand description
RAII guard (resource-cleanup-on-drop) that flushes pending events on drop.
Returned by init and RlgBuilder::init. Hold it in main —
dropping it calls ENGINE.shutdown().
let _guard = rlg::init().unwrap();
// … application code …
// ← guard drops here, flushing all pending logsTrait Implementations§
Source§impl Debug for FlushGuard
impl Debug for FlushGuard
Source§impl Drop for FlushGuard
impl Drop for FlushGuard
Auto Trait Implementations§
impl Freeze for FlushGuard
impl RefUnwindSafe for FlushGuard
impl Send for FlushGuard
impl Sync for FlushGuard
impl Unpin for FlushGuard
impl UnsafeUnpin for FlushGuard
impl UnwindSafe for FlushGuard
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