pub struct MethodRegistry { /* private fields */ }Implementations§
Source§impl MethodRegistry
impl MethodRegistry
pub fn new() -> Self
Sourcepub fn register(
&mut self,
name: impl Into<String>,
method: impl Method + 'static,
)
pub fn register( &mut self, name: impl Into<String>, method: impl Method + 'static, )
Register a named method. Accepts anything that implements Method,
including closures.
pub fn is_empty(&self) -> bool
Trait Implementations§
Source§impl Clone for MethodRegistry
impl Clone for MethodRegistry
Source§fn clone(&self) -> MethodRegistry
fn clone(&self) -> MethodRegistry
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 moreAuto Trait Implementations§
impl Freeze for MethodRegistry
impl !RefUnwindSafe for MethodRegistry
impl Send for MethodRegistry
impl Sync for MethodRegistry
impl Unpin for MethodRegistry
impl UnsafeUnpin for MethodRegistry
impl !UnwindSafe for MethodRegistry
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