pub struct Method {
pub name: String,
pub handler: Arc<Box<dyn Fn(Value) -> Result<Value> + Send + Sync>>,
pub docs: Vec<String>,
}Expand description
Method definition with handler and documentation
Fields§
§name: String§handler: Arc<Box<dyn Fn(Value) -> Result<Value> + Send + Sync>>§docs: Vec<String>Trait Implementations§
Auto Trait Implementations§
impl Freeze for Method
impl !RefUnwindSafe for Method
impl Send for Method
impl Sync for Method
impl Unpin for Method
impl !UnwindSafe for Method
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