#[non_exhaustive]pub enum Dispatch {
Static,
Bound,
Dynamic,
}Expand description
How a call reaches its callee.
§Examples
use typeck_lang::Dispatch;
assert_ne!(Dispatch::Static, Dispatch::Dynamic);Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Static
The callee is known here.
Bound
An interface method called on a placeholder (inside a generic item):
the implementing method depends on the instance (resolved per
instance in the MonoPlan, or through the dictionary of a shared
item).
Dynamic
An interface method called on a dyn value: dispatched at run time.
Trait Implementations§
impl Copy for Dispatch
impl Eq for Dispatch
impl StructuralPartialEq for Dispatch
Auto Trait Implementations§
impl Freeze for Dispatch
impl RefUnwindSafe for Dispatch
impl Send for Dispatch
impl Sync for Dispatch
impl Unpin for Dispatch
impl UnsafeUnpin for Dispatch
impl UnwindSafe for Dispatch
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