Enum sp_wasm_interface::ReturnValue [−][src]
pub enum ReturnValue { Unit, Value(Value), }
Typed value that can be returned from a function.
Basically a TypedValue
plus Unit
, for functions which return nothing.
Variants
For returning nothing.
Value(Value)
For returning some concrete value.
Implementations
impl ReturnValue
[src]
impl ReturnValue
[src]pub const ENCODED_MAX_SIZE: usize
[src]
Maximum number of bytes ReturnValue
might occupy when serialized with SCALE
.
Breakdown: 1 byte for encoding unit/value variant 1 byte for encoding value type 8 bytes for encoding the biggest value types available in wasm: f64, i64.
Trait Implementations
impl Clone for ReturnValue
[src]
impl Clone for ReturnValue
[src]fn clone(&self) -> ReturnValue
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Decode for ReturnValue
[src]
impl Decode for ReturnValue
[src]impl Encode for ReturnValue
[src]
impl Encode for ReturnValue
[src]fn encode_to<__CodecOutputEdqy: Output + ?Sized>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy
)
[src]
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy
)
pub fn size_hint(&self) -> usize
[src]
pub fn encode(&self) -> Vec<u8, Global>
[src]
pub fn using_encoded<R, F>(&self, f: F) -> R where
F: FnOnce(&[u8]) -> R,
[src]
F: FnOnce(&[u8]) -> R,
pub fn encoded_size(&self) -> usize
[src]
impl From<Value> for ReturnValue
[src]
impl From<Value> for ReturnValue
[src]fn from(v: Value) -> ReturnValue
[src]
impl PartialEq<ReturnValue> for ReturnValue
[src]
impl PartialEq<ReturnValue> for ReturnValue
[src]fn eq(&self, other: &ReturnValue) -> bool
[src]
fn ne(&self, other: &ReturnValue) -> bool
[src]
impl Copy for ReturnValue
[src]
impl EncodeLike<ReturnValue> for ReturnValue
[src]
impl StructuralPartialEq for ReturnValue
[src]
Auto Trait Implementations
impl RefUnwindSafe for ReturnValue
impl Send for ReturnValue
impl Sync for ReturnValue
impl Unpin for ReturnValue
impl UnwindSafe for ReturnValue
Blanket Implementations
impl<T> DecodeLimit for T where
T: Decode,
[src]
impl<T> DecodeLimit for T where
T: Decode,
[src]impl<S> Codec for S where
S: Decode + Encode,
[src]
S: Decode + Encode,
impl<'_, '_, T> EncodeLike<&'_ &'_ T> for T where
T: Encode,
[src]
T: Encode,
impl<'_, T> EncodeLike<&'_ T> for T where
T: Encode,
[src]
T: Encode,
impl<'_, T> EncodeLike<&'_ mut T> for T where
T: Encode,
[src]
T: Encode,
impl<T> EncodeLike<Arc<T>> for T where
T: Encode,
[src]
T: Encode,
impl<T> EncodeLike<Box<T, Global>> for T where
T: Encode,
[src]
T: Encode,
impl<'a, T> EncodeLike<Cow<'a, T>> for T where
T: ToOwned + Encode,
[src]
T: ToOwned + Encode,
impl<T> EncodeLike<Rc<T>> for T where
T: Encode,
[src]
T: Encode,
impl<S> FullCodec for S where
S: Decode + FullEncode,
[src]
S: Decode + FullEncode,
impl<S> FullEncode for S where
S: Encode + EncodeLike<S>,
[src]
S: Encode + EncodeLike<S>,
impl<T> MaybeRefUnwindSafe for T where
T: RefUnwindSafe,
[src]
T: RefUnwindSafe,