pub struct OperationInfo {
pub name: &'static str,
pub description: &'static str,
pub authors: &'static [&'static str],
pub category: &'static str,
pub arguments: &'static [(&'static str, OperationArgType)],
pub op: fn(&OperationArguments, &mut DishData) -> DishResult,
}
Expand description
Entirely statically declared struct that holds all the information about an Operation required for embedding it in the lisp
Fields:
- name - name of the operation; must be named
lowercase-with-dashes
- description - short description of what the operation does to the dish
- authors - list of the authors who have contributed to the operation; feel free to add yourself if you’ve worked on this operation, even if only a small change!
- category - category the operation belongs to; valid categories are:
Textual
,Data Format
- arguments - list of 2-tuples where the first element is the name of the argument and the second argument is the type of the argument
- op - function pointer to the operation itself
Fields§
§name: &'static str
§description: &'static str
§category: &'static str
§arguments: &'static [(&'static str, OperationArgType)]
§op: fn(&OperationArguments, &mut DishData) -> DishResult
Trait Implementations§
Source§impl Clone for OperationInfo
impl Clone for OperationInfo
Source§fn clone(&self) -> OperationInfo
fn clone(&self) -> OperationInfo
Returns a copy 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 PartialEq for OperationInfo
impl PartialEq for OperationInfo
Source§fn eq(&self, other: &OperationInfo) -> bool
fn eq(&self, other: &OperationInfo) -> bool
Tests for
self
and other
values to be equal, and is used by ==
.Source§fn ne(&self, other: &OperationInfo) -> bool
fn ne(&self, other: &OperationInfo) -> bool
Tests for
!=
. The default implementation is almost always sufficient,
and should not be overridden without very good reason.Auto Trait Implementations§
impl Freeze for OperationInfo
impl RefUnwindSafe for OperationInfo
impl Send for OperationInfo
impl Sync for OperationInfo
impl Unpin for OperationInfo
impl UnwindSafe for OperationInfo
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