pub struct FunctionIR {
pub name: String,
pub ty: FunctionTy,
pub parameters: Vec<ParameterIR>,
pub returns: Vec<ParameterIR>,
pub mutability: MutabilityKind,
pub visibility: VisibilityKind,
pub is_virtual: bool,
pub is_override: bool,
pub base_or_modifiers: Vec<Base>,
pub body: Option<Statement>,
pub doc: NatspecDocIR,
}Expand description
Representation of a Solidity function or constructor.
Fields§
§name: String§ty: FunctionTy§parameters: Vec<ParameterIR>§returns: Vec<ParameterIR>§mutability: MutabilityKind§visibility: VisibilityKind§is_virtual: boolWhether this function is marked virtual.
is_override: boolWhether this function is marked override.
base_or_modifiers: Vec<Base>Modifier applications and constructor base invocations.
body: Option<Statement>§doc: NatspecDocIRNatspec documentation for this function
Trait Implementations§
Source§impl Clone for FunctionIR
impl Clone for FunctionIR
Source§fn clone(&self) -> FunctionIR
fn clone(&self) -> FunctionIR
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 FunctionIR
impl RefUnwindSafe for FunctionIR
impl Send for FunctionIR
impl Sync for FunctionIR
impl Unpin for FunctionIR
impl UnwindSafe for FunctionIR
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more