pub struct FunctionInfo {
pub name: &'static str,
pub alias: &'static [&'static str],
pub desc: Option<&'static str>,
pub args: &'static [ArgInfo],
pub method: fn(&mut HashMap<String, Option<String>>) -> Result<()>,
}Fields§
§name: &'static str§alias: &'static [&'static str]§desc: Option<&'static str>§args: &'static [ArgInfo]§method: fn(&mut HashMap<String, Option<String>>) -> Result<()>Implementations§
Source§impl FunctionInfo
impl FunctionInfo
pub const fn new( name: &'static str, alias: &'static [&'static str], args: &'static [ArgInfo], method: fn(&mut HashMap<String, Option<String>>) -> Result<()>, ) -> Self
pub const fn new_with_desc( name: &'static str, alias: &'static [&'static str], desc: Option<&'static str>, args: &'static [ArgInfo], method: fn(&mut HashMap<String, Option<String>>) -> Result<()>, ) -> Self
pub fn invoke(&self, args: &mut HashMap<String, Option<String>>) -> Result<()>
Trait Implementations§
Source§impl Clone for FunctionInfo
impl Clone for FunctionInfo
Source§fn clone(&self) -> FunctionInfo
fn clone(&self) -> FunctionInfo
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 moreimpl Collect for FunctionInfo
impl Copy for FunctionInfo
Auto Trait Implementations§
impl Freeze for FunctionInfo
impl RefUnwindSafe for FunctionInfo
impl Send for FunctionInfo
impl Sync for FunctionInfo
impl Unpin for FunctionInfo
impl UnwindSafe for FunctionInfo
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