Enum rgb::prelude::OwnedState[][src]

pub enum OwnedState<STATE> where
    STATE: StateTypes,
    STATE::Confidential: PartialEq + Eq,
    STATE::Confidential: From<<STATE::Revealed as CommitConceal>::ConcealedCommitment>, 
{ Confidential { seal_definition: Confidential, assigned_state: STATE::Confidential, }, Revealed { seal_definition: Revealed, assigned_state: STATE::Revealed, }, ConfidentialSeal { seal_definition: Confidential, assigned_state: STATE::Revealed, }, ConfidentialAmount { seal_definition: Revealed, assigned_state: STATE::Confidential, }, }

State data are assigned to a seal definition, which means that they are owned by a person controlling spending of the seal UTXO, unless the seal is closed, indicating that a transfer of ownership had taken place

Variants

Confidential

Fields of Confidential

seal_definition: Confidentialassigned_state: STATE::Confidential
Revealed

Fields of Revealed

seal_definition: Revealedassigned_state: STATE::Revealed
ConfidentialSeal

Fields of ConfidentialSeal

seal_definition: Confidentialassigned_state: STATE::Revealed
ConfidentialAmount

Fields of ConfidentialAmount

seal_definition: Revealedassigned_state: STATE::Confidential

Implementations

impl<STATE> OwnedState<STATE> where
    STATE: StateTypes,
    STATE::Confidential: PartialEq + Eq,
    STATE::Confidential: From<<STATE::Revealed as CommitConceal>::ConcealedCommitment>, 
[src]

pub fn seal_definition_confidential(&self) -> Confidential[src]

pub fn seal_definition(&self) -> Option<Revealed>[src]

pub fn assigned_state_confidential(&self) -> STATE::Confidential[src]

pub fn assigned_state(&self) -> Option<&STATE::Revealed>[src]

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

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

Trait Implementations

impl<STATE: Clone> Clone for OwnedState<STATE> where
    STATE: StateTypes,
    STATE::Confidential: PartialEq + Eq,
    STATE::Confidential: From<<STATE::Revealed as CommitConceal>::ConcealedCommitment>,
    STATE::Confidential: Clone,
    STATE::Revealed: Clone,
    STATE::Revealed: Clone,
    STATE::Confidential: Clone
[src]

impl<STATE> CommitConceal for OwnedState<STATE> where
    Self: Clone,
    STATE: StateTypes,
    STATE::Confidential: PartialEq + Eq,
    STATE::Confidential: From<<STATE::Revealed as CommitConceal>::ConcealedCommitment>, 
[src]

type ConcealedCommitment = Self

impl<STATE> CommitEncode for OwnedState<STATE> where
    Self: Clone,
    STATE: StateTypes,
    STATE::Confidential: PartialEq + Eq,
    STATE::Confidential: From<<STATE::Revealed as CommitConceal>::ConcealedCommitment>, 
[src]

impl<STATE> ConcealSeals for OwnedState<STATE> where
    STATE: StateTypes,
    STATE::Revealed: CommitConceal,
    STATE::Confidential: PartialEq + Eq,
    <STATE as StateTypes>::Confidential: From<<STATE::Revealed as CommitConceal>::ConcealedCommitment>, 
[src]

impl<STATE> ConcealState for OwnedState<STATE> where
    STATE: StateTypes,
    STATE::Revealed: CommitConceal,
    STATE::Confidential: PartialEq + Eq,
    <STATE as StateTypes>::Confidential: From<<STATE::Revealed as CommitConceal>::ConcealedCommitment>, 
[src]

impl<STATE> ConsensusCommit for OwnedState<STATE> where
    Self: Clone,
    STATE: StateTypes,
    STATE::Confidential: PartialEq + Eq,
    STATE::Confidential: From<<STATE::Revealed as CommitConceal>::ConcealedCommitment>, 
[src]

type Commitment = MerkleNode

impl<STATE: Debug> Debug for OwnedState<STATE> where
    STATE: StateTypes,
    STATE::Confidential: PartialEq + Eq,
    STATE::Confidential: From<<STATE::Revealed as CommitConceal>::ConcealedCommitment>,
    STATE::Confidential: Debug,
    STATE::Revealed: Debug,
    STATE::Revealed: Debug,
    STATE::Confidential: Debug
[src]

impl<'de, STATE> Deserialize<'de> for OwnedState<STATE> where
    STATE: StateTypes,
    STATE::Confidential: PartialEq + Eq,
    STATE::Confidential: From<<STATE::Revealed as CommitConceal>::ConcealedCommitment>,
    STATE::Confidential: Deserialize<'de>,
    STATE::Revealed: Deserialize<'de>,
    STATE::Revealed: Deserialize<'de>,
    STATE::Confidential: Deserialize<'de>, 
[src]

impl<STATE> Display for OwnedState<STATE> where
    STATE: StateTypes,
    STATE::Confidential: PartialEq + Eq,
    STATE::Confidential: From<<STATE::Revealed as CommitConceal>::ConcealedCommitment>, 
[src]

impl<STATE> Eq for OwnedState<STATE> where
    STATE: StateTypes,
    STATE::Confidential: PartialEq + Eq,
    STATE::Confidential: From<<STATE::Revealed as CommitConceal>::ConcealedCommitment>, 
[src]

impl<STATE> IntoRevealed for OwnedState<STATE> where
    Self: Clone,
    STATE: StateTypes,
    STATE::Confidential: PartialEq + Eq,
    STATE::Confidential: From<<STATE::Revealed as CommitConceal>::ConcealedCommitment>, 
[src]

impl<STATE> Ord for OwnedState<STATE> where
    STATE: StateTypes,
    STATE::Confidential: PartialEq + Eq,
    STATE::Confidential: From<<STATE::Revealed as CommitConceal>::ConcealedCommitment>, 
[src]

impl<STATE> PartialEq<OwnedState<STATE>> for OwnedState<STATE> where
    STATE: StateTypes,
    STATE::Confidential: PartialEq + Eq,
    STATE::Confidential: From<<STATE::Revealed as CommitConceal>::ConcealedCommitment>, 
[src]

impl<STATE> PartialOrd<OwnedState<STATE>> for OwnedState<STATE> where
    STATE: StateTypes,
    STATE::Confidential: PartialEq + Eq,
    STATE::Confidential: From<<STATE::Revealed as CommitConceal>::ConcealedCommitment>, 
[src]

impl<STATE> Serialize for OwnedState<STATE> where
    STATE: StateTypes,
    STATE::Confidential: PartialEq + Eq,
    STATE::Confidential: From<<STATE::Revealed as CommitConceal>::ConcealedCommitment>,
    STATE::Confidential: Serialize,
    STATE::Revealed: Serialize,
    STATE::Revealed: Serialize,
    STATE::Confidential: Serialize
[src]

impl<STATE> StrictDecode for OwnedState<STATE> where
    STATE: StateTypes,
    STATE::Confidential: PartialEq + Eq,
    STATE::Confidential: From<<STATE::Revealed as CommitConceal>::ConcealedCommitment>, 
[src]

impl<STATE> StrictEncode for OwnedState<STATE> where
    STATE: StateTypes,
    STATE::Confidential: PartialEq + Eq,
    STATE::Confidential: From<<STATE::Revealed as CommitConceal>::ConcealedCommitment>, 
[src]

Auto Trait Implementations

impl<STATE> RefUnwindSafe for OwnedState<STATE> where
    <STATE as StateTypes>::Confidential: RefUnwindSafe,
    <STATE as StateTypes>::Revealed: RefUnwindSafe

impl<STATE> Send for OwnedState<STATE> where
    <STATE as StateTypes>::Confidential: Send,
    <STATE as StateTypes>::Revealed: Send

impl<STATE> Sync for OwnedState<STATE> where
    <STATE as StateTypes>::Confidential: Sync,
    <STATE as StateTypes>::Revealed: Sync

impl<STATE> Unpin for OwnedState<STATE> where
    <STATE as StateTypes>::Confidential: Unpin,
    <STATE as StateTypes>::Revealed: Unpin

impl<STATE> UnwindSafe for OwnedState<STATE> where
    <STATE as StateTypes>::Confidential: UnwindSafe,
    <STATE as StateTypes>::Revealed: UnwindSafe

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>,