Struct leo_ast::functions::function::Function[][src]

pub struct Function {
    pub annotations: Vec<Annotation>,
    pub identifier: Identifier,
    pub input: Vec<FunctionInput>,
    pub output: Option<Type>,
    pub block: Block,
    pub span: Span,
}

Fields

annotations: Vec<Annotation>identifier: Identifierinput: Vec<FunctionInput>output: Option<Type>block: Blockspan: Span

Implementations

impl Function[src]

pub fn get_name(&self) -> &str[src]

pub fn contains_self(&self) -> bool[src]

Returns true if the function has input self or mut self. Returns false otherwise.

pub fn contains_mut_self(&self) -> bool[src]

Returns true if the function has input mut self. Returns false otherwise.

pub fn filter_self_inputs(&self) -> impl Iterator<Item = &FunctionInput>[src]

Returns an iterator of [&FunctionInput] removing self and mut self inputs.

Trait Implementations

impl Clone for Function[src]

impl Debug for Function[src]

impl<'de> Deserialize<'de> for Function[src]

impl Display for Function[src]

impl Eq for Function[src]

impl Node for Function[src]

impl PartialEq<Function> for Function[src]

impl Serialize for Function[src]

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

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.