Enum som_core::ast::MethodKind
source · pub enum MethodKind {
Unary,
Positional {
parameters: Vec<String>,
},
Operator {
rhs: String,
},
}
Expand description
Represents a method’s kind.
Example:
"unary method" increment = ( self increment: 1 )
"positional method" increment: value = ( total := total + value )
"operator method" + value = ( self increment: value )
Variants§
Unary
A unary method definition.
Positional
A positional method definition (keyword-based).
Operator
A binary operator method definiton.
Trait Implementations§
source§impl Clone for MethodKind
impl Clone for MethodKind
source§fn clone(&self) -> MethodKind
fn clone(&self) -> MethodKind
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for MethodKind
impl Debug for MethodKind
source§impl PartialEq for MethodKind
impl PartialEq for MethodKind
source§fn eq(&self, other: &MethodKind) -> bool
fn eq(&self, other: &MethodKind) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for MethodKind
Auto Trait Implementations§
impl Freeze for MethodKind
impl RefUnwindSafe for MethodKind
impl Send for MethodKind
impl Sync for MethodKind
impl Unpin for MethodKind
impl UnwindSafe for MethodKind
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