[−][src]Struct ergo_lib::chain::ergo_box::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]
regs: HashMap<NonMandatoryRegisterId, Constant>
) -> Result<NonMandatoryRegisters, NonMandatoryRegistersError>
Create new from map
pub fn from_ordered_values(
values: Vec<Constant>
) -> Result<NonMandatoryRegisters, NonMandatoryRegistersError>
[src]
values: Vec<Constant>
) -> Result<NonMandatoryRegisters, NonMandatoryRegistersError>
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]
pub fn clone(&self) -> NonMandatoryRegisters
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for NonMandatoryRegisters
[src]
impl<'de> Deserialize<'de> for NonMandatoryRegisters
[src]
pub fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Eq for NonMandatoryRegisters
[src]
impl Into<HashMap<NonMandatoryRegisterId, Constant, RandomState>> for NonMandatoryRegisters
[src]
pub fn into(self) -> HashMap<NonMandatoryRegisterId, Constant>
[src]
impl PartialEq<NonMandatoryRegisters> for NonMandatoryRegisters
[src]
pub fn eq(&self, other: &NonMandatoryRegisters) -> bool
[src]
pub fn ne(&self, other: &NonMandatoryRegisters) -> bool
[src]
impl Serialize for NonMandatoryRegisters
[src]
pub fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
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.
pub fn try_from(
reg_map: HashMap<NonMandatoryRegisterId, Constant>
) -> Result<Self, Self::Error>
[src]
reg_map: HashMap<NonMandatoryRegisterId, Constant>
) -> Result<Self, Self::Error>
impl TryFrom<HashMap<NonMandatoryRegisterId, ConstantHolder, RandomState>> for NonMandatoryRegisters
[src]
type Error = NonMandatoryRegistersError
The type returned in the event of a conversion error.
pub fn try_from(
value: HashMap<NonMandatoryRegisterId, ConstantHolder>
) -> Result<Self, Self::Error>
[src]
value: HashMap<NonMandatoryRegisterId, ConstantHolder>
) -> Result<Self, Self::Error>
Auto Trait Implementations
impl !RefUnwindSafe for NonMandatoryRegisters
[src]
impl !Send for NonMandatoryRegisters
[src]
impl !Sync for NonMandatoryRegisters
[src]
impl Unpin for NonMandatoryRegisters
[src]
impl !UnwindSafe for NonMandatoryRegisters
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
pub fn equivalent(&self, key: &K) -> bool
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<F> TryExtractInto<F> for F
[src]
pub fn try_extract_into<T>(Self) -> Result<T, TryExtractFromError> where
T: TryExtractFrom<F>,
[src]
T: TryExtractFrom<F>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,