pub struct Function {
pub annotations: Vec<Annotation>,
pub variant: Variant,
pub identifier: Identifier,
pub input: Vec<Input>,
pub output: Vec<Output>,
pub output_type: Type,
pub block: Block,
pub finalize: Option<Finalize>,
pub span: Span,
pub id: NodeID,
}Expand description
A function definition.
Fields§
§annotations: Vec<Annotation>Annotations on the function.
variant: VariantIs this function a transition, inlined, or a regular function?.
identifier: IdentifierThe function identifier, e.g., foo in function foo(...) { ... }.
input: Vec<Input>The function’s input parameters.
output: Vec<Output>The function’s output declarations.
output_type: TypeThe function’s output type.
block: BlockThe body of the function.
finalize: Option<Finalize>An optional finalize block
span: SpanThe entire span of the function definition.
id: NodeIDThe ID of the node.
Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for Function
impl<'de> Deserialize<'de> for Function
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq for Function
impl PartialEq for Function
impl Eq for Function
Auto Trait Implementations§
impl !RefUnwindSafe for Function
impl Send for Function
impl !Sync for Function
impl Unpin for Function
impl UnwindSafe for Function
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
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.