pub struct CallbackRegistry { /* private fields */ }Implementations§
Source§impl CallbackRegistry
impl CallbackRegistry
pub fn new() -> Self
pub fn register<F>(&mut self, name: &str, description: &str, callback: F)
pub fn register_with_metadata<F>( &mut self, name: &str, metadata: CallbackMetadata, callback: F, )
pub fn call(&mut self, name: &str, data: Value) -> Result<Value, ApiError>
pub fn unregister(&mut self, name: &str) -> bool
pub fn list_callbacks(&self) -> Vec<&CallbackMetadata>
pub fn get_callback_info(&self, name: &str) -> Option<&CallbackMetadata>
pub fn exists(&self, name: &str) -> bool
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CallbackRegistry
impl RefUnwindSafe for CallbackRegistry
impl Send for CallbackRegistry
impl Sync for CallbackRegistry
impl Unpin for CallbackRegistry
impl UnwindSafe for CallbackRegistry
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