pub struct OverloadRegistry {
pub entries: Vec<OverloadEntry>,
}Expand description
A registry of operator overloads.
Fields§
§entries: Vec<OverloadEntry>All overload entries
Implementations§
Source§impl OverloadRegistry
impl OverloadRegistry
Sourcepub fn register(&mut self, entry: OverloadEntry)
pub fn register(&mut self, entry: OverloadEntry)
Register an overload.
Sourcepub fn best_overload(&self, symbol: &str) -> Option<&OverloadEntry>
pub fn best_overload(&self, symbol: &str) -> Option<&OverloadEntry>
Find the highest-priority overload for a symbol.
Sourcepub fn all_overloads(&self, symbol: &str) -> Vec<&OverloadEntry>
pub fn all_overloads(&self, symbol: &str) -> Vec<&OverloadEntry>
Returns all overloads for a symbol.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for OverloadRegistry
impl RefUnwindSafe for OverloadRegistry
impl Send for OverloadRegistry
impl Sync for OverloadRegistry
impl Unpin for OverloadRegistry
impl UnsafeUnpin for OverloadRegistry
impl UnwindSafe for OverloadRegistry
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