#[non_exhaustive]pub struct Function<'a> {
pub id: &'a str,
pub description: &'a str,
pub declaration: &'a str,
pub visibility: Visibility,
pub mutability: Mutability,
pub signature: &'a str,
pub selector: &'a str,
pub selector_bytes: [u8; 4],
}Expand description
Solidity function.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.id: &'a strThe function’s unique identifier. This is the function name, optionally appended with an index if it is overloaded.
description: &'a strThe description of the function. This is a markdown string derived from the NatSpec documentation.
declaration: &'a strThe Solidity function declaration, including full type and parameter names, visibility, etc.
visibility: VisibilityThe Solidity function visibility attribute. This is currently always external, but this
may change in the future.
mutability: MutabilityThe Solidity function state mutability attribute.
signature: &'a strThe standard function signature used to calculate selector.
See the Solidity docs for more information.
selector: &'a strThe hex-encoded, “0x”-prefixed 4-byte function selector,
which is the Keccak-256 hash of signature.
selector_bytes: [u8; 4]The 4-byte function selector as a byte array.
Trait Implementations§
Source§impl<'de: 'a, 'a> Deserialize<'de> for Function<'a>
impl<'de: 'a, 'a> Deserialize<'de> for Function<'a>
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>,
Source§impl<'a> JsonSchema for Function<'a>
impl<'a> JsonSchema for Function<'a>
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl<'a> Ord for Function<'a>
impl<'a> Ord for Function<'a>
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl<'a> PartialOrd for Function<'a>
impl<'a> PartialOrd for Function<'a>
impl<'a> Eq for Function<'a>
impl<'a> StructuralPartialEq for Function<'a>
Auto Trait Implementations§
impl<'a> Freeze for Function<'a>
impl<'a> RefUnwindSafe for Function<'a>
impl<'a> Send for Function<'a>
impl<'a> Sync for Function<'a>
impl<'a> Unpin for Function<'a>
impl<'a> UnwindSafe for Function<'a>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§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
key and return true if they are equal.impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 88 bytes