Enum rgb::prelude::OwnedState [−][src]
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
Fields of Confidential
seal_definition: Confidential
assigned_state: STATE::Confidential
Fields of ConfidentialSeal
seal_definition: Confidential
assigned_state: STATE::Revealed
Fields of ConfidentialAmount
seal_definition: Revealed
assigned_state: STATE::Confidential
Implementations
impl<STATE> OwnedState<STATE> where
STATE: StateTypes,
STATE::Confidential: PartialEq + Eq,
STATE::Confidential: From<<STATE::Revealed as CommitConceal>::ConcealedCommitment>,
[src]
STATE: StateTypes,
STATE::Confidential: PartialEq + Eq,
STATE::Confidential: From<<STATE::Revealed as CommitConceal>::ConcealedCommitment>,
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]
&mut self,
known_seals: impl Iterator<Item = &'a OutpointReveal>
) -> usize
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]
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,
fn clone(&self) -> OwnedState<STATE>
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[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]
Self: Clone,
STATE: StateTypes,
STATE::Confidential: PartialEq + Eq,
STATE::Confidential: From<<STATE::Revealed as CommitConceal>::ConcealedCommitment>,
type ConcealedCommitment = Self
fn commit_conceal(&self) -> Self::ConcealedCommitment
[src]
impl<STATE> CommitEncode for OwnedState<STATE> where
Self: Clone,
STATE: StateTypes,
STATE::Confidential: PartialEq + Eq,
STATE::Confidential: From<<STATE::Revealed as CommitConceal>::ConcealedCommitment>,
[src]
Self: Clone,
STATE: StateTypes,
STATE::Confidential: PartialEq + Eq,
STATE::Confidential: From<<STATE::Revealed as CommitConceal>::ConcealedCommitment>,
fn commit_encode<E: Write>(&self, e: E) -> usize
[src]
pub fn commit_serialize(&self) -> Vec<u8, Global>
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]
STATE: StateTypes,
STATE::Revealed: CommitConceal,
STATE::Confidential: PartialEq + Eq,
<STATE as StateTypes>::Confidential: From<<STATE::Revealed as CommitConceal>::ConcealedCommitment>,
fn conceal_seals(&mut self, seals: &Vec<Confidential>) -> usize
[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]
STATE: StateTypes,
STATE::Revealed: CommitConceal,
STATE::Confidential: PartialEq + Eq,
<STATE as StateTypes>::Confidential: From<<STATE::Revealed as CommitConceal>::ConcealedCommitment>,
fn conceal_state_except(&mut self, seals: &Vec<Confidential>) -> usize
[src]
fn conceal_state(&mut self) -> usize
[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]
Self: Clone,
STATE: StateTypes,
STATE::Confidential: PartialEq + Eq,
STATE::Confidential: From<<STATE::Revealed as CommitConceal>::ConcealedCommitment>,
type Commitment = MerkleNode
pub fn consensus_commit(&self) -> Self::Commitment
pub fn consensus_verify(&self, commitment: &Self::Commitment) -> bool
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]
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,
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]
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>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl<STATE> Display for OwnedState<STATE> where
STATE: StateTypes,
STATE::Confidential: PartialEq + Eq,
STATE::Confidential: From<<STATE::Revealed as CommitConceal>::ConcealedCommitment>,
[src]
STATE: StateTypes,
STATE::Confidential: PartialEq + Eq,
STATE::Confidential: From<<STATE::Revealed as CommitConceal>::ConcealedCommitment>,
impl<STATE> Eq for OwnedState<STATE> where
STATE: StateTypes,
STATE::Confidential: PartialEq + Eq,
STATE::Confidential: From<<STATE::Revealed as CommitConceal>::ConcealedCommitment>,
[src]
STATE: StateTypes,
STATE::Confidential: PartialEq + Eq,
STATE::Confidential: From<<STATE::Revealed as CommitConceal>::ConcealedCommitment>,
impl<STATE> IntoRevealed for OwnedState<STATE> where
Self: Clone,
STATE: StateTypes,
STATE::Confidential: PartialEq + Eq,
STATE::Confidential: From<<STATE::Revealed as CommitConceal>::ConcealedCommitment>,
[src]
Self: Clone,
STATE: StateTypes,
STATE::Confidential: PartialEq + Eq,
STATE::Confidential: From<<STATE::Revealed as CommitConceal>::ConcealedCommitment>,
fn into_revealed(self, other: Self) -> Result<Self, Error>
[src]
impl<STATE> Ord for OwnedState<STATE> where
STATE: StateTypes,
STATE::Confidential: PartialEq + Eq,
STATE::Confidential: From<<STATE::Revealed as CommitConceal>::ConcealedCommitment>,
[src]
STATE: StateTypes,
STATE::Confidential: PartialEq + Eq,
STATE::Confidential: From<<STATE::Revealed as CommitConceal>::ConcealedCommitment>,
fn cmp(&self, other: &Self) -> Ordering
[src]
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[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]
STATE: StateTypes,
STATE::Confidential: PartialEq + Eq,
STATE::Confidential: From<<STATE::Revealed as CommitConceal>::ConcealedCommitment>,
impl<STATE> PartialOrd<OwnedState<STATE>> for OwnedState<STATE> where
STATE: StateTypes,
STATE::Confidential: PartialEq + Eq,
STATE::Confidential: From<<STATE::Revealed as CommitConceal>::ConcealedCommitment>,
[src]
STATE: StateTypes,
STATE::Confidential: PartialEq + Eq,
STATE::Confidential: From<<STATE::Revealed as CommitConceal>::ConcealedCommitment>,
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
[src]
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[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]
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,
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl<STATE> StrictDecode for OwnedState<STATE> where
STATE: StateTypes,
STATE::Confidential: PartialEq + Eq,
STATE::Confidential: From<<STATE::Revealed as CommitConceal>::ConcealedCommitment>,
[src]
STATE: StateTypes,
STATE::Confidential: PartialEq + Eq,
STATE::Confidential: From<<STATE::Revealed as CommitConceal>::ConcealedCommitment>,
fn strict_decode<D: Read>(d: D) -> Result<Self, Error>
[src]
pub fn strict_deserialize(data: impl AsRef<[u8]>) -> Result<Self, Error>
[src]
impl<STATE> StrictEncode for OwnedState<STATE> where
STATE: StateTypes,
STATE::Confidential: PartialEq + Eq,
STATE::Confidential: From<<STATE::Revealed as CommitConceal>::ConcealedCommitment>,
[src]
STATE: StateTypes,
STATE::Confidential: PartialEq + Eq,
STATE::Confidential: From<<STATE::Revealed as CommitConceal>::ConcealedCommitment>,
Auto Trait Implementations
impl<STATE> RefUnwindSafe for OwnedState<STATE> where
<STATE as StateTypes>::Confidential: RefUnwindSafe,
<STATE as StateTypes>::Revealed: RefUnwindSafe,
<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,
<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,
<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,
<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,
<STATE as StateTypes>::Confidential: UnwindSafe,
<STATE as StateTypes>::Revealed: UnwindSafe,
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<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<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
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>,