Enum rgb::contract::Assignments[][src]

pub enum Assignments {
    Declarative(Vec<OwnedState<DeclarativeStrategy>>),
    DiscreteFiniteField(Vec<OwnedState<PedersenStrategy>>),
    CustomData(Vec<OwnedState<HashStrategy>>),
}

Variants

DiscreteFiniteField(Vec<OwnedState<PedersenStrategy>>)

Implementations

impl Assignments[src]

pub fn zero_balanced(
    inputs: Vec<Revealed>,
    allocations_ours: Vec<(SealDefinition, AtomicValue)>,
    allocations_theirs: Vec<(SealEndpoint, AtomicValue)>
) -> Self
[src]

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

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

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

pub fn declarative_state_mut(
    &mut self
) -> Option<&mut Vec<OwnedState<DeclarativeStrategy>>>
[src]

pub fn discrete_state_mut(
    &mut self
) -> Option<&mut Vec<OwnedState<PedersenStrategy>>>
[src]

pub fn custom_state_mut(&mut self) -> Option<&mut Vec<OwnedState<HashStrategy>>>[src]

pub fn to_declarative_state(&self) -> Vec<OwnedState<DeclarativeStrategy>>[src]

pub fn to_discrete_state(&self) -> Vec<OwnedState<PedersenStrategy>>[src]

pub fn to_custom_state(&self) -> Vec<OwnedState<HashStrategy>>[src]

pub fn into_declarative_state(self) -> Vec<OwnedState<DeclarativeStrategy>>[src]

pub fn into_discrete_state(self) -> Vec<OwnedState<PedersenStrategy>>[src]

pub fn into_custom_state(self) -> Vec<OwnedState<HashStrategy>>[src]

pub fn seal_definition(
    &self,
    index: u16
) -> Result<Option<Revealed>, NoDataError>
[src]

If seal definition does not exist, returns NoDataError. If the seal is confidential, returns Ok(None); otherwise returns revealed seal data packed as Ok(Some(seal::Revealed))

pub fn known_seal_definitions(&self) -> Vec<Revealed>[src]

pub fn all_seal_definitions(&self) -> Vec<Confidential>[src]

pub fn known_state_values(&self) -> Vec<&Revealed>[src]

pub fn known_state_data(&self) -> Vec<&Revealed>[src]

pub fn all_state_pedersen(&self) -> Vec<Confidential>[src]

pub fn all_state_hashed(&self) -> Vec<Confidential>[src]

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

pub fn reveal_seals<'a>(
    &mut self,
    known_seals: impl Iterator<Item = &'a OutpointReveal> + Clone
) -> usize
[src]

Reveals previously known seal information (replacing blind UTXOs with explicit ones). Function is used when a peer receives consignment containing concealed seals for the outputs owned by the peer

pub fn consensus_commitments(&self) -> Vec<MerkleNode>[src]

impl Assignments[src]

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

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

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

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

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

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

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

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

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

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

pub fn bytes(&self) -> Vec<Vec<u8>>[src]

pub fn string(&self) -> Vec<String>[src]

Trait Implementations

impl Clone for Assignments[src]

impl ConcealSeals for Assignments[src]

impl ConcealState for Assignments[src]

impl Debug for Assignments[src]

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

impl Display for Assignments[src]

impl Eq for Assignments[src]

impl IntoRevealed for Assignments[src]

impl PartialEq<Assignments> for Assignments[src]

impl Serialize for Assignments[src]

impl StrictDecode for Assignments[src]

impl StrictEncode for Assignments[src]

impl StructuralEq for Assignments[src]

impl StructuralPartialEq for Assignments[src]

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<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<T> ToString for T where
    T: Display + ?Sized
[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>,