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(value: ArrayLayout<F>) -> Self
fn from(value: ArrayLayout<F>) -> Self
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(value: EnumLayout<F>) -> Self
fn from(value: EnumLayout<F>) -> Self
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(value: HashLayout<F>) -> Self
fn from(value: HashLayout<F>) -> Self
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(value: LeafLayout<F>) -> Self
fn from(value: LeafLayout<F>) -> Self
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(value: RootLayout<F>) -> Self
fn from(value: RootLayout<F>) -> Self
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(value: StructLayout<F>) -> Self
fn from(value: StructLayout<F>) -> Self
Converts to this type from the input type.
source§impl<F: Form + JsonSchema> JsonSchema for Layout<F>
impl<F: Form + JsonSchema> JsonSchema for Layout<F>
source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
source§fn json_schema(gen: &mut SchemaGenerator) -> Schema
fn json_schema(gen: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref
keyword. Read moresource§impl<F: Ord + Form> Ord for Layout<F>
impl<F: Ord + Form> Ord for Layout<F>
source§impl<F: PartialEq + Form> PartialEq for Layout<F>
impl<F: PartialEq + Form> PartialEq for Layout<F>
source§impl<F: PartialOrd + Form> PartialOrd for Layout<F>
impl<F: PartialOrd + Form> PartialOrd 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 moreimpl<F: Eq + Form> Eq for Layout<F>
impl<F: Form> StructuralPartialEq for Layout<F>
Auto Trait Implementations§
impl<F> Freeze for Layout<F>
impl<F> RefUnwindSafe for Layout<F>where
<F as Form>::Type: RefUnwindSafe,
<F as Form>::String: RefUnwindSafe,
impl<F> Send for Layout<F>
impl<F> Sync for Layout<F>
impl<F> Unpin for Layout<F>
impl<F> UnwindSafe for Layout<F>where
<F as Form>::Type: UnwindSafe + RefUnwindSafe,
<F as Form>::String: UnwindSafe + RefUnwindSafe,
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