#[non_exhaustive]pub enum FnSelfArg {
None,
TakeSelf,
RefSelf,
MutSelf,
}
Expand description
The self
argument of a function
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.
None
No self
argument. The function will be a static function.
TakeSelf
self
. The function will consume self.
RefSelf
&self
. The function will take self by reference.
MutSelf
&mut self
. The function will take self by mutable reference.
Auto Trait Implementations§
impl Freeze for FnSelfArg
impl RefUnwindSafe for FnSelfArg
impl Send for FnSelfArg
impl Sync for FnSelfArg
impl Unpin for FnSelfArg
impl UnwindSafe for FnSelfArg
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