pub struct ChapelProc {
pub name: String,
pub params: Vec<ChapelParam>,
pub return_type: Option<ChapelType>,
pub body: Vec<ChapelStmt>,
pub is_iter: bool,
pub is_inline: bool,
pub is_override: bool,
pub is_operator: bool,
pub where_clause: Option<String>,
}Expand description
A Chapel procedure (function).
Fields§
§name: StringProcedure name
params: Vec<ChapelParam>Parameters
return_type: Option<ChapelType>Return type (None = void)
body: Vec<ChapelStmt>Body statements
is_iter: boolWhether this is a parallel iterator (iter keyword)
is_inline: boolWhether the proc is inline
is_override: boolWhether the proc is override
is_operator: boolWhether the proc is operator
where_clause: Option<String>where clause expression
Implementations§
Source§impl ChapelProc
impl ChapelProc
Sourcepub fn new(
name: impl Into<String>,
params: Vec<ChapelParam>,
return_type: Option<ChapelType>,
body: Vec<ChapelStmt>,
) -> Self
pub fn new( name: impl Into<String>, params: Vec<ChapelParam>, return_type: Option<ChapelType>, body: Vec<ChapelStmt>, ) -> Self
Create a simple procedure.
Sourcepub fn with_where(self, clause: impl Into<String>) -> Self
pub fn with_where(self, clause: impl Into<String>) -> Self
Add a where clause.
Trait Implementations§
Source§impl Clone for ChapelProc
impl Clone for ChapelProc
Source§fn clone(&self) -> ChapelProc
fn clone(&self) -> ChapelProc
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 ChapelProc
impl RefUnwindSafe for ChapelProc
impl Send for ChapelProc
impl Sync for ChapelProc
impl Unpin for ChapelProc
impl UnsafeUnpin for ChapelProc
impl UnwindSafe for ChapelProc
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