Enum ink_metadata::layout::Layout
source · [−]pub enum Layout<F: Form = MetaForm> {
Cell(CellLayout<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
Cell(CellLayout<F>)
An encoded cell.
This is the only leaf node within the layout graph. All layout nodes have this node type as their leafs.
This represents the encoding of a single cell mapped to a single key.
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 associated storage cells encoded with a given type.
This can also represent only a single 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
sourceimpl<'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,
sourcefn 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
sourceimpl<F: Form> From<ArrayLayout<F>> for Layout<F>
impl<F: Form> From<ArrayLayout<F>> for Layout<F>
sourcefn from(original: ArrayLayout<F>) -> Layout<F>
fn from(original: ArrayLayout<F>) -> Layout<F>
Converts to this type from the input type.
sourceimpl<F: Form> From<CellLayout<F>> for Layout<F>
impl<F: Form> From<CellLayout<F>> for Layout<F>
sourcefn from(original: CellLayout<F>) -> Layout<F>
fn from(original: CellLayout<F>) -> Layout<F>
Converts to this type from the input type.
sourceimpl<F: Form> From<EnumLayout<F>> for Layout<F>
impl<F: Form> From<EnumLayout<F>> for Layout<F>
sourcefn from(original: EnumLayout<F>) -> Layout<F>
fn from(original: EnumLayout<F>) -> Layout<F>
Converts to this type from the input type.
sourceimpl<F: Form> From<HashLayout<F>> for Layout<F>
impl<F: Form> From<HashLayout<F>> for Layout<F>
sourcefn from(original: HashLayout<F>) -> Layout<F>
fn from(original: HashLayout<F>) -> Layout<F>
Converts to this type from the input type.
sourceimpl<F: Form> From<StructLayout<F>> for Layout<F>
impl<F: Form> From<StructLayout<F>> for Layout<F>
sourcefn from(original: StructLayout<F>) -> Layout<F>
fn from(original: StructLayout<F>) -> Layout<F>
Converts to this type from the input type.
sourceimpl IntoPortable for Layout
impl IntoPortable for Layout
type Output = Layout<PortableForm>
type Output = Layout<PortableForm>
The portable version of Self
.
sourcefn into_portable(self, registry: &mut Registry) -> Self::Output
fn into_portable(self, registry: &mut Registry) -> Self::Output
Convert self
to the portable form by using the registry for caching.
sourceimpl<F: Ord + Form> Ord for Layout<F>
impl<F: Ord + Form> Ord for Layout<F>
sourceimpl<F: PartialOrd + Form> PartialOrd<Layout<F>> for Layout<F>
impl<F: PartialOrd + Form> PartialOrd<Layout<F>> for Layout<F>
sourcefn partial_cmp(&self, other: &Layout<F>) -> Option<Ordering>
fn partial_cmp(&self, other: &Layout<F>) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn 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
impl<F: Eq + Form> Eq for Layout<F>
impl<F: Form> StructuralEq for Layout<F>
impl<F: Form> StructuralPartialEq for Layout<F>
Auto Trait Implementations
impl<F> RefUnwindSafe for Layout<F> where
<F as Form>::String: RefUnwindSafe,
<F as Form>::Type: RefUnwindSafe,
impl<F> Send for Layout<F> where
<F as Form>::String: Send,
<F as Form>::Type: Send,
impl<F> Sync for Layout<F> where
<F as Form>::String: Sync,
<F as Form>::Type: Sync,
impl<F> Unpin for Layout<F> where
<F as Form>::String: Unpin,
<F as Form>::Type: Unpin,
impl<F> UnwindSafe for Layout<F> where
<F as Form>::String: UnwindSafe + RefUnwindSafe,
<F as Form>::Type: UnwindSafe + RefUnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more