Struct ink_metadata::layout::StructLayout
source · [−]Expand description
A struct layout with consecutive fields of different layout.
Implementations
sourceimpl StructLayout
impl StructLayout
sourcepub fn new<F>(fields: F) -> Self where
F: IntoIterator<Item = FieldLayout>,
pub fn new<F>(fields: F) -> Self where
F: IntoIterator<Item = FieldLayout>,
Creates a new struct layout.
sourceimpl<F> StructLayout<F> where
F: Form,
impl<F> StructLayout<F> where
F: Form,
sourcepub fn fields(&self) -> &[FieldLayout<F>]
pub fn fields(&self) -> &[FieldLayout<F>]
Returns the fields of the struct layout.
Trait Implementations
sourceimpl<F: Debug + Form> Debug for StructLayout<F>
impl<F: Debug + Form> Debug for StructLayout<F>
sourceimpl<'de, F: Form> Deserialize<'de> for StructLayout<F> where
F::Type: DeserializeOwned,
F::String: DeserializeOwned,
impl<'de, F: Form> Deserialize<'de> for StructLayout<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<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 StructLayout
impl IntoPortable for StructLayout
type Output = StructLayout<PortableForm>
type Output = StructLayout<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 StructLayout<F>
impl<F: Ord + Form> Ord for StructLayout<F>
sourceimpl<F: PartialEq + Form> PartialEq<StructLayout<F>> for StructLayout<F>
impl<F: PartialEq + Form> PartialEq<StructLayout<F>> for StructLayout<F>
sourcefn eq(&self, other: &StructLayout<F>) -> bool
fn eq(&self, other: &StructLayout<F>) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &StructLayout<F>) -> bool
fn ne(&self, other: &StructLayout<F>) -> bool
This method tests for !=
.
sourceimpl<F: PartialOrd + Form> PartialOrd<StructLayout<F>> for StructLayout<F>
impl<F: PartialOrd + Form> PartialOrd<StructLayout<F>> for StructLayout<F>
sourcefn partial_cmp(&self, other: &StructLayout<F>) -> Option<Ordering>
fn partial_cmp(&self, other: &StructLayout<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 StructLayout<F>
impl<F: Form> StructuralEq for StructLayout<F>
impl<F: Form> StructuralPartialEq for StructLayout<F>
Auto Trait Implementations
impl<F> RefUnwindSafe for StructLayout<F> where
<F as Form>::String: RefUnwindSafe,
<F as Form>::Type: RefUnwindSafe,
impl<F> Send for StructLayout<F> where
<F as Form>::String: Send,
<F as Form>::Type: Send,
impl<F> Sync for StructLayout<F> where
<F as Form>::String: Sync,
<F as Form>::Type: Sync,
impl<F> Unpin for StructLayout<F> where
<F as Form>::String: Unpin,
<F as Form>::Type: Unpin,
impl<F> UnwindSafe for StructLayout<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