pub struct MultiMethod {
pub name: Spur,
pub dispatch_fn: Value,
pub methods: RefCell<BTreeMap<Value, Value>>,
pub default: RefCell<Option<Value>>,
}Expand description
A multimethod: dispatch-function + method table.
Interior-mutable so defmethod can add methods after creation.
Fields§
§name: Spur§dispatch_fn: Value§methods: RefCell<BTreeMap<Value, Value>>§default: RefCell<Option<Value>>Trait Implementations§
Source§impl Clone for MultiMethod
impl Clone for MultiMethod
Auto Trait Implementations§
impl !Freeze for MultiMethod
impl !RefUnwindSafe for MultiMethod
impl Send for MultiMethod
impl !Sync for MultiMethod
impl Unpin for MultiMethod
impl UnsafeUnpin for MultiMethod
impl UnwindSafe for MultiMethod
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