[][src]Trait sp_runtime_interface::host::IntoPreallocatedFFIValue

pub trait IntoPreallocatedFFIValue: RIType {
    type SelfInstance;
    pub fn into_preallocated_ffi_value(
        self_instance: Self::SelfInstance,
        context: &mut dyn FunctionContext,
        allocated: Self::FFIType
    ) -> Result<()>; }

Something that can be converted into a preallocated ffi value.

Every type parameter that should be given as &mut into a runtime interface function, needs to implement this trait. After executing the host implementation of the runtime interface function, the value is copied into the preallocated wasm memory.

This should only be used for types which have a fixed size, like slices. Other types like a vec do not work with this interface, as we can not call into wasm to reallocate memory. So, this trait should be implemented carefully.

Associated Types

type SelfInstance[src]

As Self can be an unsized type, it needs to be represented by a sized type at the host. This SelfInstance is the sized type.

Loading content...

Required methods

pub fn into_preallocated_ffi_value(
    self_instance: Self::SelfInstance,
    context: &mut dyn FunctionContext,
    allocated: Self::FFIType
) -> Result<()>
[src]

Convert self_instance into the given preallocated ffi value.

Loading content...

Implementations on Foreign Types

impl IntoPreallocatedFFIValue for [u8][src]

type SelfInstance = Vec<u8>

impl IntoPreallocatedFFIValue for [u8; 1][src]

type SelfInstance = [u8; 1]

impl IntoPreallocatedFFIValue for [u8; 2][src]

type SelfInstance = [u8; 2]

impl IntoPreallocatedFFIValue for [u8; 3][src]

type SelfInstance = [u8; 3]

impl IntoPreallocatedFFIValue for [u8; 4][src]

type SelfInstance = [u8; 4]

impl IntoPreallocatedFFIValue for [u8; 5][src]

type SelfInstance = [u8; 5]

impl IntoPreallocatedFFIValue for [u8; 6][src]

type SelfInstance = [u8; 6]

impl IntoPreallocatedFFIValue for [u8; 7][src]

type SelfInstance = [u8; 7]

impl IntoPreallocatedFFIValue for [u8; 8][src]

type SelfInstance = [u8; 8]

impl IntoPreallocatedFFIValue for [u8; 9][src]

type SelfInstance = [u8; 9]

impl IntoPreallocatedFFIValue for [u8; 10][src]

type SelfInstance = [u8; 10]

impl IntoPreallocatedFFIValue for [u8; 11][src]

type SelfInstance = [u8; 11]

impl IntoPreallocatedFFIValue for [u8; 12][src]

type SelfInstance = [u8; 12]

impl IntoPreallocatedFFIValue for [u8; 13][src]

type SelfInstance = [u8; 13]

impl IntoPreallocatedFFIValue for [u8; 14][src]

type SelfInstance = [u8; 14]

impl IntoPreallocatedFFIValue for [u8; 15][src]

type SelfInstance = [u8; 15]

impl IntoPreallocatedFFIValue for [u8; 16][src]

type SelfInstance = [u8; 16]

impl IntoPreallocatedFFIValue for [u8; 17][src]

type SelfInstance = [u8; 17]

impl IntoPreallocatedFFIValue for [u8; 18][src]

type SelfInstance = [u8; 18]

impl IntoPreallocatedFFIValue for [u8; 19][src]

type SelfInstance = [u8; 19]

impl IntoPreallocatedFFIValue for [u8; 20][src]

type SelfInstance = [u8; 20]

impl IntoPreallocatedFFIValue for [u8; 21][src]

type SelfInstance = [u8; 21]

impl IntoPreallocatedFFIValue for [u8; 22][src]

type SelfInstance = [u8; 22]

impl IntoPreallocatedFFIValue for [u8; 23][src]

type SelfInstance = [u8; 23]

impl IntoPreallocatedFFIValue for [u8; 24][src]

type SelfInstance = [u8; 24]

impl IntoPreallocatedFFIValue for [u8; 25][src]

type SelfInstance = [u8; 25]

impl IntoPreallocatedFFIValue for [u8; 26][src]

type SelfInstance = [u8; 26]

impl IntoPreallocatedFFIValue for [u8; 27][src]

type SelfInstance = [u8; 27]

impl IntoPreallocatedFFIValue for [u8; 28][src]

type SelfInstance = [u8; 28]

impl IntoPreallocatedFFIValue for [u8; 29][src]

type SelfInstance = [u8; 29]

impl IntoPreallocatedFFIValue for [u8; 30][src]

type SelfInstance = [u8; 30]

impl IntoPreallocatedFFIValue for [u8; 31][src]

type SelfInstance = [u8; 31]

impl IntoPreallocatedFFIValue for [u8; 32][src]

type SelfInstance = [u8; 32]

impl IntoPreallocatedFFIValue for [u8; 33][src]

type SelfInstance = [u8; 33]

impl IntoPreallocatedFFIValue for [u8; 34][src]

type SelfInstance = [u8; 34]

impl IntoPreallocatedFFIValue for [u8; 35][src]

type SelfInstance = [u8; 35]

impl IntoPreallocatedFFIValue for [u8; 36][src]

type SelfInstance = [u8; 36]

impl IntoPreallocatedFFIValue for [u8; 37][src]

type SelfInstance = [u8; 37]

impl IntoPreallocatedFFIValue for [u8; 38][src]

type SelfInstance = [u8; 38]

impl IntoPreallocatedFFIValue for [u8; 39][src]

type SelfInstance = [u8; 39]

impl IntoPreallocatedFFIValue for [u8; 40][src]

type SelfInstance = [u8; 40]

impl IntoPreallocatedFFIValue for [u8; 41][src]

type SelfInstance = [u8; 41]

impl IntoPreallocatedFFIValue for [u8; 42][src]

type SelfInstance = [u8; 42]

impl IntoPreallocatedFFIValue for [u8; 43][src]

type SelfInstance = [u8; 43]

impl IntoPreallocatedFFIValue for [u8; 44][src]

type SelfInstance = [u8; 44]

impl IntoPreallocatedFFIValue for [u8; 45][src]

type SelfInstance = [u8; 45]

impl IntoPreallocatedFFIValue for [u8; 46][src]

type SelfInstance = [u8; 46]

impl IntoPreallocatedFFIValue for [u8; 47][src]

type SelfInstance = [u8; 47]

impl IntoPreallocatedFFIValue for [u8; 48][src]

type SelfInstance = [u8; 48]

impl IntoPreallocatedFFIValue for [u8; 49][src]

type SelfInstance = [u8; 49]

impl IntoPreallocatedFFIValue for [u8; 50][src]

type SelfInstance = [u8; 50]

impl IntoPreallocatedFFIValue for [u8; 51][src]

type SelfInstance = [u8; 51]

impl IntoPreallocatedFFIValue for [u8; 52][src]

type SelfInstance = [u8; 52]

impl IntoPreallocatedFFIValue for [u8; 53][src]

type SelfInstance = [u8; 53]

impl IntoPreallocatedFFIValue for [u8; 54][src]

type SelfInstance = [u8; 54]

impl IntoPreallocatedFFIValue for [u8; 55][src]

type SelfInstance = [u8; 55]

impl IntoPreallocatedFFIValue for [u8; 56][src]

type SelfInstance = [u8; 56]

impl IntoPreallocatedFFIValue for [u8; 57][src]

type SelfInstance = [u8; 57]

impl IntoPreallocatedFFIValue for [u8; 58][src]

type SelfInstance = [u8; 58]

impl IntoPreallocatedFFIValue for [u8; 59][src]

type SelfInstance = [u8; 59]

impl IntoPreallocatedFFIValue for [u8; 60][src]

type SelfInstance = [u8; 60]

impl IntoPreallocatedFFIValue for [u8; 61][src]

type SelfInstance = [u8; 61]

impl IntoPreallocatedFFIValue for [u8; 62][src]

type SelfInstance = [u8; 62]

impl IntoPreallocatedFFIValue for [u8; 63][src]

type SelfInstance = [u8; 63]

impl IntoPreallocatedFFIValue for [u8; 64][src]

type SelfInstance = [u8; 64]

impl IntoPreallocatedFFIValue for [u8; 65][src]

type SelfInstance = [u8; 65]

impl IntoPreallocatedFFIValue for [u8; 66][src]

type SelfInstance = [u8; 66]

impl IntoPreallocatedFFIValue for [u8; 67][src]

type SelfInstance = [u8; 67]

impl IntoPreallocatedFFIValue for [u8; 68][src]

type SelfInstance = [u8; 68]

impl IntoPreallocatedFFIValue for [u8; 69][src]

type SelfInstance = [u8; 69]

impl IntoPreallocatedFFIValue for [u8; 70][src]

type SelfInstance = [u8; 70]

impl IntoPreallocatedFFIValue for [u8; 71][src]

type SelfInstance = [u8; 71]

impl IntoPreallocatedFFIValue for [u8; 72][src]

type SelfInstance = [u8; 72]

impl IntoPreallocatedFFIValue for [u8; 73][src]

type SelfInstance = [u8; 73]

impl IntoPreallocatedFFIValue for [u8; 74][src]

type SelfInstance = [u8; 74]

impl IntoPreallocatedFFIValue for [u8; 75][src]

type SelfInstance = [u8; 75]

impl IntoPreallocatedFFIValue for [u8; 76][src]

type SelfInstance = [u8; 76]

impl IntoPreallocatedFFIValue for [u8; 77][src]

type SelfInstance = [u8; 77]

impl IntoPreallocatedFFIValue for [u8; 78][src]

type SelfInstance = [u8; 78]

impl IntoPreallocatedFFIValue for [u8; 79][src]

type SelfInstance = [u8; 79]

impl IntoPreallocatedFFIValue for [u8; 80][src]

type SelfInstance = [u8; 80]

impl IntoPreallocatedFFIValue for [u8; 81][src]

type SelfInstance = [u8; 81]

impl IntoPreallocatedFFIValue for [u8; 82][src]

type SelfInstance = [u8; 82]

impl IntoPreallocatedFFIValue for [u8; 83][src]

type SelfInstance = [u8; 83]

impl IntoPreallocatedFFIValue for [u8; 84][src]

type SelfInstance = [u8; 84]

impl IntoPreallocatedFFIValue for [u8; 85][src]

type SelfInstance = [u8; 85]

impl IntoPreallocatedFFIValue for [u8; 86][src]

type SelfInstance = [u8; 86]

impl IntoPreallocatedFFIValue for [u8; 87][src]

type SelfInstance = [u8; 87]

impl IntoPreallocatedFFIValue for [u8; 88][src]

type SelfInstance = [u8; 88]

impl IntoPreallocatedFFIValue for [u8; 89][src]

type SelfInstance = [u8; 89]

impl IntoPreallocatedFFIValue for [u8; 90][src]

type SelfInstance = [u8; 90]

impl IntoPreallocatedFFIValue for [u8; 91][src]

type SelfInstance = [u8; 91]

impl IntoPreallocatedFFIValue for [u8; 92][src]

type SelfInstance = [u8; 92]

impl IntoPreallocatedFFIValue for [u8; 93][src]

type SelfInstance = [u8; 93]

impl IntoPreallocatedFFIValue for [u8; 94][src]

type SelfInstance = [u8; 94]

impl IntoPreallocatedFFIValue for [u8; 95][src]

type SelfInstance = [u8; 95]

impl IntoPreallocatedFFIValue for [u8; 96][src]

type SelfInstance = [u8; 96]

Loading content...

Implementors

Loading content...