Enum ink_metadata::layout::Layout
source · pub enum Layout<F: Form = MetaForm> {
Leaf(LeafLayout<F>),
Root(RootLayout<F>),
Hash(HashLayout<F>),
Array(ArrayLayout<F>),
Struct(StructLayout<F>),
Enum(EnumLayout<F>),
}
Expand description
Represents the static storage layout of an ink! smart contract.
Variants§
Leaf(LeafLayout<F>)
An encoded cell.
This is the only leaf node within the layout graph. All layout nodes have this node type as their leafs.
Root(RootLayout<F>)
The root cell defines the storage key for all sub-trees.
Hash(HashLayout<F>)
A layout that hashes values into the entire storage key space.
This is commonly used by ink! hashmaps and similar data structures.
Array(ArrayLayout<F>)
An array of type associated with storage cell.
Struct(StructLayout<F>)
A struct layout with fields of different types.
Enum(EnumLayout<F>)
An enum layout with a discriminant telling which variant is layed out.
Trait Implementations§
source§impl<'de, F: Form> Deserialize<'de> for Layout<F>where
F::Type: DeserializeOwned,
F::String: DeserializeOwned,
impl<'de, F: Form> Deserialize<'de> for Layout<F>where
F::Type: DeserializeOwned,
F::String: DeserializeOwned,
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl<F: Form> From<ArrayLayout<F>> for Layout<F>
impl<F: Form> From<ArrayLayout<F>> for Layout<F>
source§fn from(original: ArrayLayout<F>) -> Layout<F>
fn from(original: ArrayLayout<F>) -> Layout<F>
Converts to this type from the input type.
source§impl<F: Form> From<EnumLayout<F>> for Layout<F>
impl<F: Form> From<EnumLayout<F>> for Layout<F>
source§fn from(original: EnumLayout<F>) -> Layout<F>
fn from(original: EnumLayout<F>) -> Layout<F>
Converts to this type from the input type.
source§impl<F: Form> From<HashLayout<F>> for Layout<F>
impl<F: Form> From<HashLayout<F>> for Layout<F>
source§fn from(original: HashLayout<F>) -> Layout<F>
fn from(original: HashLayout<F>) -> Layout<F>
Converts to this type from the input type.
source§impl<F: Form> From<LeafLayout<F>> for Layout<F>
impl<F: Form> From<LeafLayout<F>> for Layout<F>
source§fn from(original: LeafLayout<F>) -> Layout<F>
fn from(original: LeafLayout<F>) -> Layout<F>
Converts to this type from the input type.
source§impl<F: Form> From<RootLayout<F>> for Layout<F>
impl<F: Form> From<RootLayout<F>> for Layout<F>
source§fn from(original: RootLayout<F>) -> Layout<F>
fn from(original: RootLayout<F>) -> Layout<F>
Converts to this type from the input type.
source§impl<F: Form> From<StructLayout<F>> for Layout<F>
impl<F: Form> From<StructLayout<F>> for Layout<F>
source§fn from(original: StructLayout<F>) -> Layout<F>
fn from(original: StructLayout<F>) -> Layout<F>
Converts to this type from the input type.
source§impl<F: Ord + Form> Ord for Layout<F>
impl<F: Ord + Form> Ord for Layout<F>
source§impl<F: PartialEq + Form> PartialEq<Layout<F>> for Layout<F>
impl<F: PartialEq + Form> PartialEq<Layout<F>> for Layout<F>
source§impl<F: PartialOrd + Form> PartialOrd<Layout<F>> for Layout<F>
impl<F: PartialOrd + Form> PartialOrd<Layout<F>> for Layout<F>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read more