pub struct ChapelClass {
pub name: String,
pub parent: Option<String>,
pub fields: Vec<ChapelField>,
pub methods: Vec<ChapelProc>,
pub type_params: Vec<String>,
}Expand description
A Chapel class definition.
Fields§
§name: StringClass name
parent: Option<String>Optional parent class
fields: Vec<ChapelField>Fields
methods: Vec<ChapelProc>Methods
type_params: Vec<String>Optional generic type parameters
Implementations§
Source§impl ChapelClass
impl ChapelClass
Sourcepub fn with_parent(self, parent: impl Into<String>) -> Self
pub fn with_parent(self, parent: impl Into<String>) -> Self
Set the parent class.
Sourcepub fn add_field(&mut self, field: ChapelField)
pub fn add_field(&mut self, field: ChapelField)
Add a field.
Sourcepub fn add_method(&mut self, method: ChapelProc)
pub fn add_method(&mut self, method: ChapelProc)
Add a method.
Trait Implementations§
Source§impl Clone for ChapelClass
impl Clone for ChapelClass
Source§fn clone(&self) -> ChapelClass
fn clone(&self) -> ChapelClass
Returns a duplicate 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 moreAuto Trait Implementations§
impl Freeze for ChapelClass
impl RefUnwindSafe for ChapelClass
impl Send for ChapelClass
impl Sync for ChapelClass
impl Unpin for ChapelClass
impl UnsafeUnpin for ChapelClass
impl UnwindSafe for ChapelClass
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