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]

fn clone(&self) -> Assignments[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl ConcealSeals for Assignments[src]

fn conceal_seals(&mut self, seals: &Vec<Confidential>) -> usize[src]

impl ConcealState for Assignments[src]

fn conceal_state_except(&mut self, seals: &Vec<Confidential>) -> usize[src]

fn conceal_state(&mut self) -> usize[src]

impl Debug for Assignments[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

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

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
    __D: Deserializer<'de>, 
[src]

Deserialize this value from the given Serde deserializer. Read more

impl Display for Assignments[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl IntoRevealed for Assignments[src]

fn into_revealed(self, other: Self) -> Result<Self, Error>[src]

impl PartialEq<Assignments> for Assignments[src]

fn eq(&self, other: &Assignments) -> bool[src]

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, other: &Assignments) -> bool[src]

This method tests for !=.

impl Serialize for Assignments[src]

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
    __S: Serializer
[src]

Serialize this value into the given Serde serializer. Read more

impl StrictDecode for Assignments[src]

fn strict_decode<D: Read>(d: D) -> Result<Self, Error>[src]

Decode with the given [std::io::Reader] instance; must either construct an instance or return implementation-specific error type. Read more

fn strict_deserialize(data: impl AsRef<[u8]>) -> Result<Self, Error>[src]

Tries to deserialize byte array into the current type using [strict_decode()] Read more

impl StrictEncode for Assignments[src]

fn strict_encode<E: Write>(&self, e: E) -> Result<usize, Error>[src]

Encode with the given [std::io::Writer] instance; must return result with either amount of bytes encoded – or implementation-specific error type. Read more

fn strict_serialize(&self) -> Result<Vec<u8, Global>, Error>[src]

Serializes data as a byte array using [strict_encode()] function

impl Eq 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]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

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

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

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

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

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

pub fn from(t: T) -> T[src]

Performs the conversion.

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

pub fn into(self) -> U[src]

Performs the conversion.

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.

pub fn to_owned(&self) -> T[src]

Creates owned data from borrowed data, usually by cloning. Read more

pub fn clone_into(&self, target: &mut T)[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

impl<T> ToString for T where
    T: Display + ?Sized
[src]

pub default fn to_string(&self) -> String[src]

Converts the given value to a String. Read more

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.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

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.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.

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

pub fn vzip(self) -> V

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