mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 14:37:57 +00:00
sp-runtime-interface add table about FFI types (#4668)
Adds a table to the rustdoc that shows how each individual type is passed between the wasm and the host side.
This commit is contained in:
committed by
Gavin Wood
parent
b72ba98b97
commit
1b9baad04f
@@ -150,7 +150,7 @@ impl IntoFFIValue for bool {
|
||||
///
|
||||
/// The `u64` value is build by `length 32bit << 32 | pointer 32bit`
|
||||
///
|
||||
/// If `T == u8` the length and the pointer are taken directly from the `Self`.
|
||||
/// If `T == u8` the length and the pointer are taken directly from `Self`.
|
||||
/// Otherwise `Self` is encoded and the length and the pointer are taken from the encoded vector.
|
||||
impl<T> RIType for Vec<T> {
|
||||
type FFIType = u64;
|
||||
@@ -209,7 +209,7 @@ impl<T: 'static + Decode> FromFFIValue for Vec<T> {
|
||||
///
|
||||
/// The `u64` value is build by `length 32bit << 32 | pointer 32bit`
|
||||
///
|
||||
/// If `T == u8` the length and the pointer are taken directly from the `Self`.
|
||||
/// If `T == u8` the length and the pointer are taken directly from `Self`.
|
||||
/// Otherwise `Self` is encoded and the length and the pointer are taken from the encoded vector.
|
||||
impl<T> RIType for [T] {
|
||||
type FFIType = u64;
|
||||
@@ -400,7 +400,7 @@ for_primitive_types! {
|
||||
///
|
||||
/// The `u64` value is build by `length 32bit << 32 | pointer 32bit`
|
||||
///
|
||||
/// The length and the pointer are taken directly from the `Self`.
|
||||
/// The length and the pointer are taken directly from `Self`.
|
||||
impl RIType for str {
|
||||
type FFIType = u64;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user