Struct nyar_hir::FunctionType
source · pub struct FunctionType {
pub symbol: Symbol,
pub export: bool,
pub entry: bool,
pub input: IndexMap<String, ParameterType>,
pub output: Vec<NyarType>,
pub body: FunctionBody,
pub span: FileSpan,
}
Expand description
function
Fields§
§symbol: Symbol
§export: bool
§entry: bool
§input: IndexMap<String, ParameterType>
§output: Vec<NyarType>
§body: FunctionBody
§span: FileSpan
Implementations§
source§impl FunctionType
impl FunctionType
pub fn new(path: Symbol) -> Self
pub fn name(&self) -> String
pub fn with_public(self) -> Self
pub fn with_inputs<I>(self, inputs: I) -> Selfwhere
I: IntoIterator<Item = ParameterType>,
pub fn with_outputs<I>(self, outputs: I) -> Selfwhere
I: IntoIterator<Item = NyarType>,
pub fn with_operations<I>(self, operations: I) -> Selfwhere
I: IntoIterator<Item = Operation>,
Auto Trait Implementations§
impl RefUnwindSafe for FunctionType
impl Send for FunctionType
impl Sync for FunctionType
impl Unpin for FunctionType
impl UnwindSafe for FunctionType
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