Struct fuels_types::param_types::EnumVariants
source · [−]pub struct EnumVariants { /* private fields */ }
Implementations
sourceimpl EnumVariants
impl EnumVariants
pub fn new(variants: Vec<ParamType>) -> Result<EnumVariants, NoVariants>
pub fn param_types(&self) -> &Vec<ParamType>
pub fn only_units_inside(&self) -> bool
sourcepub fn compute_encoding_width_of_enum(&self) -> usize
pub fn compute_encoding_width_of_enum(&self) -> usize
Calculates how many WORDs are needed to encode an enum.
sourcepub fn compute_padding_amount(&self, variant_param_type: &ParamType) -> usize
pub fn compute_padding_amount(&self, variant_param_type: &ParamType) -> usize
Determines the padding needed for the provided enum variant (based on the width of the biggest variant) and returns it.
Trait Implementations
sourceimpl Clone for EnumVariants
impl Clone for EnumVariants
sourcefn clone(&self) -> EnumVariants
fn clone(&self) -> EnumVariants
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for EnumVariants
impl Debug for EnumVariants
sourceimpl PartialEq<EnumVariants> for EnumVariants
impl PartialEq<EnumVariants> for EnumVariants
sourcefn eq(&self, other: &EnumVariants) -> bool
fn eq(&self, other: &EnumVariants) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
impl Eq for EnumVariants
impl StructuralEq for EnumVariants
impl StructuralPartialEq for EnumVariants
Auto Trait Implementations
impl RefUnwindSafe for EnumVariants
impl Send for EnumVariants
impl Sync for EnumVariants
impl Unpin for EnumVariants
impl UnwindSafe for EnumVariants
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