pub enum MethodRole {
Around,
Before,
Primary,
After,
}Expand description
Role of a method within a generic function’s combination.
Roles order the execution plan: Around wraps the call, Before and
After run for effect around the single applicable Primary.
Variants§
Around
Wraps the whole call; most specific runs outermost.
Before
Runs for effect before the primary method; most specific first.
Primary
Provides the call’s result; exactly one applies per call.
After
Runs for effect after the primary method; least specific first.
Implementations§
Source§impl MethodRole
impl MethodRole
Trait Implementations§
Source§impl Clone for MethodRole
impl Clone for MethodRole
Source§fn clone(&self) -> MethodRole
fn clone(&self) -> MethodRole
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for MethodRole
Source§impl Debug for MethodRole
impl Debug for MethodRole
impl Eq for MethodRole
Source§impl Ord for MethodRole
impl Ord for MethodRole
Source§fn cmp(&self, other: &MethodRole) -> Ordering
fn cmp(&self, other: &MethodRole) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for MethodRole
impl PartialEq for MethodRole
Source§fn eq(&self, other: &MethodRole) -> bool
fn eq(&self, other: &MethodRole) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for MethodRole
impl PartialOrd for MethodRole
impl StructuralPartialEq for MethodRole
Auto Trait Implementations§
impl Freeze for MethodRole
impl RefUnwindSafe for MethodRole
impl Send for MethodRole
impl Sync for MethodRole
impl Unpin for MethodRole
impl UnsafeUnpin for MethodRole
impl UnwindSafe for MethodRole
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