pub struct BeforeSendHook(/* private fields */);Expand description
Hook that can modify or discard events before they are sent.
Hooks run before serialization. Return Some(event) to continue sending the
event, or None to drop it.
Hook panics are caught and cause the current event to be dropped. If a hook keeps mutable state, a panic can leave that state partially updated; the SDK recovers the hook mutex and subsequent events continue through the same hook.
Implementations§
Trait Implementations§
Source§impl Clone for BeforeSendHook
impl Clone for BeforeSendHook
Source§fn clone(&self) -> BeforeSendHook
fn clone(&self) -> BeforeSendHook
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 BeforeSendHook
impl RefUnwindSafe for BeforeSendHook
impl Send for BeforeSendHook
impl Sync for BeforeSendHook
impl Unpin for BeforeSendHook
impl UnsafeUnpin for BeforeSendHook
impl UnwindSafe for BeforeSendHook
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