[][src]Enum lnpbp::rgb::contract::OwnedState

pub enum OwnedState<STATE> where
    STATE: StateTypes,
    STATE::Confidential: PartialEq + Eq,
    STATE::Confidential: From<<STATE::Revealed as Conceal>::Confidential>,
    EncodingError: From<<STATE::Confidential as StrictEncode>::Error> + From<<STATE::Confidential as StrictDecode>::Error> + From<<STATE::Revealed as StrictEncode>::Error> + From<<STATE::Revealed as StrictDecode>::Error>, 
{ 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 Conceal>::Confidential>,
    EncodingError: From<<STATE::Confidential as StrictEncode>::Error> + From<<STATE::Confidential as StrictDecode>::Error> + From<<STATE::Revealed as StrictEncode>::Error> + From<<STATE::Revealed as StrictDecode>::Error>, 
[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> AutoConceal for OwnedState<STATE> where
    STATE: StateTypes,
    STATE::Revealed: Conceal,
    STATE::Confidential: PartialEq + Eq,
    <STATE as StateTypes>::Confidential: From<<STATE::Revealed as Conceal>::Confidential>,
    EncodingError: From<<STATE::Confidential as StrictEncode>::Error> + From<<STATE::Confidential as StrictDecode>::Error> + From<<STATE::Revealed as StrictEncode>::Error> + From<<STATE::Revealed as StrictDecode>::Error>, 
[src]

impl<STATE: Clone> Clone for OwnedState<STATE> where
    STATE: StateTypes,
    STATE::Confidential: PartialEq + Eq,
    STATE::Confidential: From<<STATE::Revealed as Conceal>::Confidential>,
    EncodingError: From<<STATE::Confidential as StrictEncode>::Error> + From<<STATE::Confidential as StrictDecode>::Error> + From<<STATE::Revealed as StrictEncode>::Error> + From<<STATE::Revealed as StrictDecode>::Error>,
    STATE::Confidential: Clone,
    STATE::Revealed: Clone,
    STATE::Revealed: Clone,
    STATE::Confidential: Clone
[src]

impl<STATE> CommitEncodeWithStrategy for OwnedState<STATE> where
    STATE: StateTypes,
    STATE::Confidential: PartialEq + Eq,
    STATE::Confidential: From<<STATE::Revealed as Conceal>::Confidential>,
    EncodingError: From<<STATE::Confidential as StrictEncode>::Error> + From<<STATE::Confidential as StrictDecode>::Error> + From<<STATE::Revealed as StrictEncode>::Error> + From<<STATE::Revealed as StrictDecode>::Error>, 
[src]

impl<STATE> Conceal for OwnedState<STATE> where
    Self: Clone,
    STATE: StateTypes,
    STATE::Confidential: PartialEq + Eq,
    STATE::Confidential: From<<STATE::Revealed as Conceal>::Confidential>,
    EncodingError: From<<STATE::Confidential as StrictEncode>::Error> + From<<STATE::Confidential as StrictDecode>::Error> + From<<STATE::Revealed as StrictEncode>::Error> + From<<STATE::Revealed as StrictDecode>::Error>, 
[src]

type Confidential = OwnedState<STATE>

impl<STATE: Debug> Debug for OwnedState<STATE> where
    STATE: StateTypes,
    STATE::Confidential: PartialEq + Eq,
    STATE::Confidential: From<<STATE::Revealed as Conceal>::Confidential>,
    EncodingError: From<<STATE::Confidential as StrictEncode>::Error> + From<<STATE::Confidential as StrictDecode>::Error> + From<<STATE::Revealed as StrictEncode>::Error> + From<<STATE::Revealed as StrictDecode>::Error>,
    STATE::Confidential: Debug,
    STATE::Revealed: Debug,
    STATE::Revealed: Debug,
    STATE::Confidential: Debug
[src]

impl<STATE> Display for OwnedState<STATE> where
    STATE: StateTypes,
    STATE::Confidential: PartialEq + Eq,
    STATE::Confidential: From<<STATE::Revealed as Conceal>::Confidential>,
    EncodingError: From<<STATE::Confidential as StrictEncode>::Error> + From<<STATE::Confidential as StrictDecode>::Error> + From<<STATE::Revealed as StrictEncode>::Error> + From<<STATE::Revealed as StrictDecode>::Error>, 
[src]

impl<STATE> Eq for OwnedState<STATE> where
    STATE: StateTypes,
    STATE::Confidential: PartialEq + Eq,
    STATE::Confidential: From<<STATE::Revealed as Conceal>::Confidential>,
    EncodingError: From<<STATE::Confidential as StrictEncode>::Error> + From<<STATE::Confidential as StrictDecode>::Error> + From<<STATE::Revealed as StrictEncode>::Error> + From<<STATE::Revealed as StrictDecode>::Error>, 
[src]

impl<STATE> Ord for OwnedState<STATE> where
    STATE: StateTypes,
    STATE::Confidential: PartialEq + Eq,
    STATE::Confidential: From<<STATE::Revealed as Conceal>::Confidential>,
    EncodingError: From<<STATE::Confidential as StrictEncode>::Error> + From<<STATE::Confidential as StrictDecode>::Error> + From<<STATE::Revealed as StrictEncode>::Error> + From<<STATE::Revealed as StrictDecode>::Error>, 
[src]

impl<STATE> PartialEq<OwnedState<STATE>> for OwnedState<STATE> where
    STATE: StateTypes,
    STATE::Confidential: PartialEq + Eq,
    STATE::Confidential: From<<STATE::Revealed as Conceal>::Confidential>,
    EncodingError: From<<STATE::Confidential as StrictEncode>::Error> + From<<STATE::Confidential as StrictDecode>::Error> + From<<STATE::Revealed as StrictEncode>::Error> + From<<STATE::Revealed as StrictDecode>::Error>, 
[src]

impl<STATE> PartialOrd<OwnedState<STATE>> for OwnedState<STATE> where
    STATE: StateTypes,
    STATE::Confidential: PartialEq + Eq,
    STATE::Confidential: From<<STATE::Revealed as Conceal>::Confidential>,
    EncodingError: From<<STATE::Confidential as StrictEncode>::Error> + From<<STATE::Confidential as StrictDecode>::Error> + From<<STATE::Revealed as StrictEncode>::Error> + From<<STATE::Revealed as StrictDecode>::Error>, 
[src]

impl<STATE> StrictDecode for OwnedState<STATE> where
    STATE: StateTypes,
    STATE::Confidential: PartialEq + Eq,
    STATE::Confidential: From<<STATE::Revealed as Conceal>::Confidential>,
    EncodingError: From<<STATE::Confidential as StrictEncode>::Error> + From<<STATE::Confidential as StrictDecode>::Error> + From<<STATE::Revealed as StrictEncode>::Error> + From<<STATE::Revealed as StrictDecode>::Error>, 
[src]

type Error = Error

Implementation-dependent error type

impl<STATE> StrictEncode for OwnedState<STATE> where
    STATE: StateTypes,
    STATE::Confidential: PartialEq + Eq,
    STATE::Confidential: From<<STATE::Revealed as Conceal>::Confidential>,
    EncodingError: From<<STATE::Confidential as StrictEncode>::Error> + From<<STATE::Confidential as StrictDecode>::Error> + From<<STATE::Revealed as StrictEncode>::Error> + From<<STATE::Revealed as StrictDecode>::Error>, 
[src]

type Error = Error

Implementation-dependent error type

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