pub struct FuncType {
pub params: Vec<ValType>,
pub results: Vec<ValType>,
}Expand description
A function signature.
LSB functions return zero or one value; the verifier (v0.5) rejects more.
§Examples
use bytecode_lang::{FuncType, ValType};
let sig = FuncType { params: vec![ValType::Dyn, ValType::Dyn], results: vec![] };
assert_eq!(sig.to_string(), "func (dyn, dyn) -> ()");Fields§
§params: Vec<ValType>Parameter types, in order.
results: Vec<ValType>Result types (zero or one).
Trait Implementations§
impl Eq for FuncType
Source§impl Ord for FuncType
impl Ord for FuncType
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for FuncType
impl PartialOrd for FuncType
impl StructuralPartialEq for FuncType
Auto Trait Implementations§
impl Freeze for FuncType
impl RefUnwindSafe for FuncType
impl Send for FuncType
impl Sync for FuncType
impl Unpin for FuncType
impl UnsafeUnpin for FuncType
impl UnwindSafe for FuncType
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