pub enum RegistryEvent {
Register {
type_name: &'static str,
},
Get {
type_name: &'static str,
found: bool,
},
Contains {
type_name: &'static str,
found: bool,
},
Clear {},
}Expand description
Events emitted by the registry during operations.
These events are passed to the tracing callback set via set_trace_callback.
The Clone derive allows callbacks to store or forward events if needed.
§Examples
use singleton_registry::RegistryEvent;
let event = RegistryEvent::Register { type_name: "i32" };
assert_eq!(event.to_string(), "register { type_name: i32 }");Variants§
Register
A value was registered in the registry.
Fields
Get
A value was requested from the registry.
Fields
Contains
A type existence check was performed.
Fields
Clear
The registry was cleared.
Trait Implementations§
Source§impl Clone for RegistryEvent
impl Clone for RegistryEvent
Source§fn clone(&self) -> RegistryEvent
fn clone(&self) -> RegistryEvent
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RegistryEvent
impl Debug for RegistryEvent
Auto Trait Implementations§
impl Freeze for RegistryEvent
impl RefUnwindSafe for RegistryEvent
impl Send for RegistryEvent
impl Sync for RegistryEvent
impl Unpin for RegistryEvent
impl UnwindSafe for RegistryEvent
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