#[non_exhaustive]pub struct DecodeWatch {
pub before: fn(kind: &'static str) -> u32,
pub after: fn(token: u32, decoded: &Decoded<'_>),
}Expand description
What is told of every decode the registry makes, once set
(watch_decodes): two plain functions, called on the thread that
decodes. Build it with DecodeWatch::new (ADR-0039).
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.before: fn(kind: &'static str) -> u32Told the kind as a decode starts; what it gives back, a token, goes
to after.
after: fn(token: u32, decoded: &Decoded<'_>)Told the decode once it is decided, with before’s token.
Implementations§
Trait Implementations§
Source§impl Clone for DecodeWatch
impl Clone for DecodeWatch
Source§fn clone(&self) -> DecodeWatch
fn clone(&self) -> DecodeWatch
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 moreimpl Copy for DecodeWatch
Auto Trait Implementations§
impl Freeze for DecodeWatch
impl RefUnwindSafe for DecodeWatch
impl Send for DecodeWatch
impl Sync for DecodeWatch
impl Unpin for DecodeWatch
impl UnsafeUnpin for DecodeWatch
impl UnwindSafe for DecodeWatch
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