Struct parity_wasm::elements::FunctionType
source · [−]pub struct FunctionType { /* private fields */ }
Expand description
Function signature type.
Implementations
sourceimpl FunctionType
impl FunctionType
sourcepub fn new(params: Vec<ValueType>, return_type: Option<ValueType>) -> Self
pub fn new(params: Vec<ValueType>, return_type: Option<ValueType>) -> Self
New function type given the signature in-params(params
) and return type (return_type
)
sourcepub fn params_mut(&mut self) -> &mut Vec<ValueType>
pub fn params_mut(&mut self) -> &mut Vec<ValueType>
Mutable parameters in the function signature.
sourcepub fn return_type(&self) -> Option<ValueType>
pub fn return_type(&self) -> Option<ValueType>
Return type in the function signature, if any.
sourcepub fn return_type_mut(&mut self) -> &mut Option<ValueType>
pub fn return_type_mut(&mut self) -> &mut Option<ValueType>
Mutable type in the function signature, if any.
Trait Implementations
sourceimpl Clone for FunctionType
impl Clone for FunctionType
sourcefn clone(&self) -> FunctionType
fn clone(&self) -> FunctionType
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
sourceimpl Debug for FunctionType
impl Debug for FunctionType
sourceimpl Default for FunctionType
impl Default for FunctionType
sourceimpl Deserialize for FunctionType
impl Deserialize for FunctionType
sourceimpl Hash for FunctionType
impl Hash for FunctionType
sourceimpl PartialEq<FunctionType> for FunctionType
impl PartialEq<FunctionType> for FunctionType
sourcefn eq(&self, other: &FunctionType) -> bool
fn eq(&self, other: &FunctionType) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &FunctionType) -> bool
fn ne(&self, other: &FunctionType) -> bool
This method tests for !=
.
sourceimpl Serialize for FunctionType
impl Serialize for FunctionType
impl Eq for FunctionType
impl StructuralEq for FunctionType
impl StructuralPartialEq for FunctionType
Auto Trait Implementations
impl RefUnwindSafe for FunctionType
impl Send for FunctionType
impl Sync for FunctionType
impl Unpin for FunctionType
impl UnwindSafe for FunctionType
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub 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.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub 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