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
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<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<LeafLayout<F>> for Layout<F>
impl<F: Form> From<LeafLayout<F>> for Layout<F>
sourcefn from(original: LeafLayout<F>) -> Layout<F>
fn from(original: LeafLayout<F>) -> Layout<F>
Converts to this type from the input type.
sourceimpl<F: Form> From<RootLayout<F>> for Layout<F>
impl<F: Form> From<RootLayout<F>> for Layout<F>
sourcefn from(original: RootLayout<F>) -> Layout<F>
fn from(original: RootLayout<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>
1.21.0 · sourcefn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl<F: PartialEq + Form> PartialEq<Layout<F>> for Layout<F>
impl<F: PartialEq + Form> PartialEq<Layout<F>> 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>
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 moreimpl<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 Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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