Struct move_binary_format::file_format::StructDefinition
source · pub struct StructDefinition {
pub struct_handle: StructHandleIndex,
pub field_information: StructFieldInformation,
}
Expand description
A StructDefinition
is a type definition. It either indicates it is native or defines all the
user-specified fields declared on the type.
Fields§
§struct_handle: StructHandleIndex
The StructHandle
for this StructDefinition
. This has the name and the abilities
for the type.
field_information: StructFieldInformation
Contains either
- Information indicating the struct is native and has no accessible fields
- Information indicating the number of fields and the start
FieldDefinition
s
Implementations§
source§impl StructDefinition
impl StructDefinition
pub fn declared_field_count(&self) -> PartialVMResult<MemberCount>
pub fn field(&self, offset: usize) -> Option<&FieldDefinition>
Trait Implementations§
source§impl Arbitrary for StructDefinition
impl Arbitrary for StructDefinition
§type Parameters = ()
type Parameters = ()
The type of parameters that
arbitrary_with
accepts for configuration
of the generated Strategy
. Parameters must implement Default
.§type Strategy = Map<(<StructHandleIndex as Arbitrary>::Strategy, <StructFieldInformation as Arbitrary>::Strategy), fn(_: (StructHandleIndex, StructFieldInformation)) -> StructDefinition>
type Strategy = Map<(<StructHandleIndex as Arbitrary>::Strategy, <StructFieldInformation as Arbitrary>::Strategy), fn(_: (StructHandleIndex, StructFieldInformation)) -> StructDefinition>
The type of
Strategy
used to generate values of type Self
.source§fn arbitrary_with(_top: Self::Parameters) -> Self::Strategy
fn arbitrary_with(_top: Self::Parameters) -> Self::Strategy
source§impl Clone for StructDefinition
impl Clone for StructDefinition
source§fn clone(&self) -> StructDefinition
fn clone(&self) -> StructDefinition
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for StructDefinition
impl Debug for StructDefinition
source§impl PartialEq<StructDefinition> for StructDefinition
impl PartialEq<StructDefinition> for StructDefinition
source§fn eq(&self, other: &StructDefinition) -> bool
fn eq(&self, other: &StructDefinition) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.