[][src]Struct ergo_lib::chain::ergo_box::NonMandatoryRegisters

pub struct NonMandatoryRegisters(_);

Stores non-mandatory registers for the box

Implementations

impl NonMandatoryRegisters[src]

pub const MAX_SIZE: usize[src]

Maximum number of non-mandatory registers

pub fn empty() -> NonMandatoryRegisters[src]

Empty non-mandatory registers

pub fn new(
    regs: HashMap<NonMandatoryRegisterId, Constant>
) -> Result<NonMandatoryRegisters, NonMandatoryRegistersError>
[src]

Create new from map

pub fn from_ordered_values(
    values: Vec<Constant>
) -> Result<NonMandatoryRegisters, NonMandatoryRegistersError>
[src]

Create new from ordered values (first element will be R4, and so on)

pub fn len(&self) -> usize[src]

Size of non-mandatory registers set

pub fn is_empty(&self) -> bool[src]

Return true if non-mandatory registers set is empty

pub fn get(&self, reg_id: NonMandatoryRegisterId) -> Option<&Constant>[src]

Get register value

pub fn get_ordered_values(&self) -> &Vec<Constant>[src]

Get ordered register values (first is R4, and so on, up to R9)

Trait Implementations

impl Clone for NonMandatoryRegisters[src]

impl Debug for NonMandatoryRegisters[src]

impl<'de> Deserialize<'de> for NonMandatoryRegisters[src]

impl Eq for NonMandatoryRegisters[src]

impl Into<HashMap<NonMandatoryRegisterId, Constant, RandomState>> for NonMandatoryRegisters[src]

impl PartialEq<NonMandatoryRegisters> for NonMandatoryRegisters[src]

impl Serialize for NonMandatoryRegisters[src]

impl StructuralEq for NonMandatoryRegisters[src]

impl StructuralPartialEq for NonMandatoryRegisters[src]

impl TryFrom<HashMap<NonMandatoryRegisterId, Constant, RandomState>> for NonMandatoryRegisters[src]

type Error = NonMandatoryRegistersError

The type returned in the event of a conversion error.

impl TryFrom<HashMap<NonMandatoryRegisterId, ConstantHolder, RandomState>> for NonMandatoryRegisters[src]

type Error = NonMandatoryRegistersError

The type returned in the event of a conversion error.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<F> TryExtractInto<F> for F[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,