pub struct ClassDef {
pub name: String,
pub super_class: Option<String>,
pub instance_locals: Vec<String>,
pub instance_methods: Vec<MethodDef>,
pub static_locals: Vec<String>,
pub static_methods: Vec<MethodDef>,
}
Expand description
Represents a class definition.
Example:
Counter = (
| total |
new = ( self reset )
increment = ( total := total + 1 )
get = ( ^ total )
reset = ( total := 0 )
)
Fields§
§name: String
The name of the class.
super_class: Option<String>
The name of the superclass.
instance_locals: Vec<String>
The locals for instances of that class.
instance_methods: Vec<MethodDef>
The methods declared for instances of that class.
static_locals: Vec<String>
The static locals for that class.
static_methods: Vec<MethodDef>
The static methods declared for that class.
Trait Implementations§
source§impl PartialEq for ClassDef
impl PartialEq for ClassDef
impl StructuralPartialEq for ClassDef
Auto Trait Implementations§
impl Freeze for ClassDef
impl RefUnwindSafe for ClassDef
impl Send for ClassDef
impl Sync for ClassDef
impl Unpin for ClassDef
impl UnwindSafe for ClassDef
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