pub struct FunctionInfo {Show 13 fields
pub name: String,
pub is_public: bool,
pub is_trait_impl: bool,
pub is_init: bool,
pub is_test: bool,
pub is_payable: bool,
pub is_view: bool,
pub is_mutable: bool,
pub is_process: bool,
pub is_private_cccalls: bool,
pub is_out_of_contract_scope: bool,
pub is_event: bool,
pub inner_calls: Option<Vec<FunctionInfo>>,
}Expand description
Function information from the code scanned by ContractDescriptor
Fields§
§name: String§is_public: boolWhether method is exported
is_trait_impl: boolWhether this is a trait implementation.
is_init: boolWhether method does not modify the state.
is_test: boolWhether method is test method
is_payable: boolWhether method accepting $NEAR.
is_view: boolWhether method does not modify the state.
is_mutable: boolWhether method can modify the state.
is_process: boolWhether method doesn’t return a value.
is_private_cccalls: boolWhether method can accept calls from self (current account)
is_out_of_contract_scope: boolWhether impl section decorated with #[near_bindgen]
is_event: boolWhether method is part of NearEvent trait
inner_calls: Option<Vec<FunctionInfo>>functions are being called by this function
Trait Implementations§
Source§impl Clone for FunctionInfo
impl Clone for FunctionInfo
Source§fn clone(&self) -> FunctionInfo
fn clone(&self) -> FunctionInfo
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 moreSource§impl Debug for FunctionInfo
impl Debug for FunctionInfo
Source§impl Default for FunctionInfo
impl Default for FunctionInfo
Source§fn default() -> FunctionInfo
fn default() -> FunctionInfo
Returns the “default value” for a type. Read more
Source§impl ToTokens for FunctionInfo
Trait for converting tokenstream to extended one
impl ToTokens for FunctionInfo
Trait for converting tokenstream to extended one
Source§fn to_tokens(&self, tokens: &mut TokenStream)
fn to_tokens(&self, tokens: &mut TokenStream)
Function extends TokenStream with FunctionInfo
Source§fn to_token_stream(&self) -> TokenStream
fn to_token_stream(&self) -> TokenStream
Converts to TokenStream
Source§fn into_token_stream(self) -> TokenStreamwhere
Self: Sized,
fn into_token_stream(self) -> TokenStreamwhere
Self: Sized,
gets the token stream
Auto Trait Implementations§
impl Freeze for FunctionInfo
impl RefUnwindSafe for FunctionInfo
impl Send for FunctionInfo
impl Sync for FunctionInfo
impl Unpin for FunctionInfo
impl UnwindSafe for FunctionInfo
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> Spanned for Twhere
T: Spanned + ?Sized,
impl<T> Spanned for Twhere
T: Spanned + ?Sized,
Source§fn span(&self) -> Span
fn span(&self) -> Span
Returns a
Span covering the complete contents of this syntax tree
node, or Span::call_site() if this node is empty.