Enum som_core::ast::MethodBody
source · pub enum MethodBody {
Primitive,
Body {
locals: Vec<String>,
body: Body,
},
}
Expand description
Represents a method’s body.
Exemple:
"primitive method body"
printString: string = primitive
"actual method body, with a local"
double: value = ( |clone| clone := double. ^ (double + clone) )
Variants§
Primitive
A primitive (meant to be implemented by the VM itself).
Body
An actual body for the method, with locals.
Trait Implementations§
source§impl Clone for MethodBody
impl Clone for MethodBody
source§fn clone(&self) -> MethodBody
fn clone(&self) -> MethodBody
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 MethodBody
impl Debug for MethodBody
source§impl PartialEq for MethodBody
impl PartialEq for MethodBody
source§fn eq(&self, other: &MethodBody) -> bool
fn eq(&self, other: &MethodBody) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for MethodBody
Auto Trait Implementations§
impl Freeze for MethodBody
impl RefUnwindSafe for MethodBody
impl Send for MethodBody
impl Sync for MethodBody
impl Unpin for MethodBody
impl UnwindSafe for MethodBody
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