Struct sway_core::TypedFunctionDeclaration
source · [−]pub struct TypedFunctionDeclaration { /* private fields */ }Implementations
sourceimpl TypedFunctionDeclaration
impl TypedFunctionDeclaration
pub fn type_check(
arguments: TypeCheckArguments<'_, FunctionDeclaration>
) -> CompileResult<TypedFunctionDeclaration>
pub fn to_fn_selector_value_untruncated(&self) -> CompileResult<Vec<u8>>
sourcepub fn to_fn_selector_value(&self) -> CompileResult<[u8; 4]>
pub fn to_fn_selector_value(&self) -> CompileResult<[u8; 4]>
Converts a TypedFunctionDeclaration into a value that is to be used in contract function selectors. Hashes the name and parameters using SHA256, and then truncates to four bytes.
pub fn to_selector_name(&self) -> CompileResult<String>
pub fn generate_json_abi(&self) -> Function
Trait Implementations
sourceimpl Clone for TypedFunctionDeclaration
impl Clone for TypedFunctionDeclaration
sourcefn clone(&self) -> TypedFunctionDeclaration
fn clone(&self) -> TypedFunctionDeclaration
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
Auto Trait Implementations
impl RefUnwindSafe for TypedFunctionDeclaration
impl Send for TypedFunctionDeclaration
impl Sync for TypedFunctionDeclaration
impl Unpin for TypedFunctionDeclaration
impl UnwindSafe for TypedFunctionDeclaration
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more