pub struct MultiFn {
pub name: Arc<str>,
pub dispatch_fn: Value,
pub methods: Mutex<HashMap<String, Value>>,
pub prefers: Mutex<HashMap<String, Vec<String>>>,
pub default_dispatch: String,
}Expand description
A Clojure multimethod — arbitrary dispatch via a user-supplied function.
Fields§
§name: Arc<str>§dispatch_fn: Value§methods: Mutex<HashMap<String, Value>>pr_str(dispatch-val) → implementation fn
prefers: Mutex<HashMap<String, Vec<String>>>recorded preferences (for future derive/hierarchy)
default_dispatch: Stringnormally “:default”
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for MultiFn
impl !RefUnwindSafe for MultiFn
impl !Send for MultiFn
impl !Sync for MultiFn
impl !UnwindSafe for MultiFn
impl Unpin for MultiFn
impl UnsafeUnpin for MultiFn
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