pub enum Assign<State, Seal>where
State: ExposedState,
Seal: ExposedSeal,{
Confidential {
seal: SecretSeal,
state: <State as ExposedState>::Confidential,
},
Revealed {
seal: Seal,
state: State,
},
ConfidentialSeal {
seal: SecretSeal,
state: State,
},
ConfidentialState {
seal: Seal,
state: <State as ExposedState>::Confidential,
},
}
Expand description
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§
Implementations§
Source§impl<State, Seal> Assign<State, Seal>where
State: ExposedState,
Seal: ExposedSeal,
impl<State, Seal> Assign<State, Seal>where
State: ExposedState,
Seal: ExposedSeal,
pub fn revealed(seal: Seal, state: State) -> Assign<State, Seal>
pub fn with_seal_replaced( assignment: &Assign<State, Seal>, seal: Seal, ) -> Assign<State, Seal>
pub fn to_confidential_seal(&self) -> SecretSeal
pub fn revealed_seal(&self) -> Option<Seal>
pub fn to_confidential_state(&self) -> <State as ExposedState>::Confidential
pub fn as_revealed_state(&self) -> Option<&State>
pub fn into_revealed_state(self) -> Option<State>
pub fn as_revealed(&self) -> Option<(&Seal, &State)>
pub fn to_revealed(&self) -> Option<(Seal, State)>
pub fn into_revealed(self) -> Option<(Seal, State)>
Trait Implementations§
Source§impl<State, Seal> Clone for Assign<State, Seal>where
State: Clone + ExposedState,
Seal: Clone + ExposedSeal,
<State as ExposedState>::Confidential: Clone,
impl<State, Seal> Clone for Assign<State, Seal>where
State: Clone + ExposedState,
Seal: Clone + ExposedSeal,
<State as ExposedState>::Confidential: Clone,
Source§impl<State, Seal> CommitEncode for Assign<State, Seal>
impl<State, Seal> CommitEncode for Assign<State, Seal>
Source§fn commit_encode(&self, e: &mut impl Write)
fn commit_encode(&self, e: &mut impl Write)
Encodes the data for the commitment by writing them directly into a
io::Write
writer instanceSource§impl<State, Seal> CommitmentId for Assign<State, Seal>
impl<State, Seal> CommitmentId for Assign<State, Seal>
Source§impl<State, Seal> Debug for Assign<State, Seal>where
State: Debug + ExposedState,
Seal: Debug + ExposedSeal,
<State as ExposedState>::Confidential: Debug,
impl<State, Seal> Debug for Assign<State, Seal>where
State: Debug + ExposedState,
Seal: Debug + ExposedSeal,
<State as ExposedState>::Confidential: Debug,
Source§impl<'de, State, Seal> Deserialize<'de> for Assign<State, Seal>where
State: ExposedState + Serialize + DeserializeOwned,
Seal: ExposedSeal + Serialize + DeserializeOwned,
<State as ExposedState>::Confidential: Serialize + DeserializeOwned,
impl<'de, State, Seal> Deserialize<'de> for Assign<State, Seal>where
State: ExposedState + Serialize + DeserializeOwned,
Seal: ExposedSeal + Serialize + DeserializeOwned,
<State as ExposedState>::Confidential: Serialize + DeserializeOwned,
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Assign<State, Seal>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Assign<State, Seal>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<State, Seal> Hash for Assign<State, Seal>where
State: ExposedState,
Seal: ExposedSeal,
impl<State, Seal> Hash for Assign<State, Seal>where
State: ExposedState,
Seal: ExposedSeal,
Source§impl<State: ExposedState, Seal: ExposedSeal> MergeReveal for Assign<State, Seal>
impl<State: ExposedState, Seal: ExposedSeal> MergeReveal for Assign<State, Seal>
fn merge_reveal(self, other: Self) -> Result<Self, MergeRevealError>
Source§impl<State, Seal> Ord for Assign<State, Seal>where
State: ExposedState,
Seal: ExposedSeal,
impl<State, Seal> Ord for Assign<State, Seal>where
State: ExposedState,
Seal: ExposedSeal,
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<State, Seal> PartialEq for Assign<State, Seal>where
State: ExposedState,
Seal: ExposedSeal,
impl<State, Seal> PartialEq for Assign<State, Seal>where
State: ExposedState,
Seal: ExposedSeal,
Source§impl<State, Seal> PartialOrd for Assign<State, Seal>where
State: ExposedState,
Seal: ExposedSeal,
impl<State, Seal> PartialOrd for Assign<State, Seal>where
State: ExposedState,
Seal: ExposedSeal,
Source§impl<State, Seal> Serialize for Assign<State, Seal>where
State: ExposedState + Serialize + DeserializeOwned,
Seal: ExposedSeal + Serialize + DeserializeOwned,
<State as ExposedState>::Confidential: Serialize + DeserializeOwned,
impl<State, Seal> Serialize for Assign<State, Seal>where
State: ExposedState + Serialize + DeserializeOwned,
Seal: ExposedSeal + Serialize + DeserializeOwned,
<State as ExposedState>::Confidential: Serialize + DeserializeOwned,
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Source§impl<State, Seal> StrictDecode for Assign<State, Seal>where
State: ExposedState,
Seal: ExposedSeal,
impl<State, Seal> StrictDecode for Assign<State, Seal>where
State: ExposedState,
Seal: ExposedSeal,
fn strict_decode( reader: &mut impl TypedRead, ) -> Result<Assign<State, Seal>, DecodeError>
fn strict_read(lim: usize, reader: impl Read) -> Result<Self, DecodeError>
Source§impl<State, Seal> StrictDumb for Assign<State, Seal>where
State: ExposedState,
Seal: ExposedSeal,
impl<State, Seal> StrictDumb for Assign<State, Seal>where
State: ExposedState,
Seal: ExposedSeal,
fn strict_dumb() -> Assign<State, Seal>
Source§impl<State, Seal> StrictEncode for Assign<State, Seal>where
State: ExposedState,
Seal: ExposedSeal,
impl<State, Seal> StrictEncode for Assign<State, Seal>where
State: ExposedState,
Seal: ExposedSeal,
fn strict_encode<W>(&self, writer: W) -> Result<W, Error>where
W: TypedWrite,
fn strict_write(&self, lim: usize, writer: impl Write) -> Result<usize, Error>
Source§impl<State, Seal> StrictSum for Assign<State, Seal>where
State: ExposedState,
Seal: ExposedSeal,
impl<State, Seal> StrictSum for Assign<State, Seal>where
State: ExposedState,
Seal: ExposedSeal,
const ALL_VARIANTS: &'static [(u8, &'static str)]
fn variant_name(&self) -> &'static str
fn strict_check_variants()
fn variant_name_by_tag(tag: u8) -> Option<FieldName>
fn variant_ord(&self) -> u8
Source§impl<State, Seal> StrictType for Assign<State, Seal>where
State: ExposedState,
Seal: ExposedSeal,
impl<State, Seal> StrictType for Assign<State, Seal>where
State: ExposedState,
Seal: ExposedSeal,
const STRICT_LIB_NAME: &'static str = LIB_NAME_RGB
fn strict_name() -> Option<TypeName>
Source§impl<State, Seal> StrictUnion for Assign<State, Seal>where
State: ExposedState,
Seal: ExposedSeal,
impl<State, Seal> StrictUnion for Assign<State, Seal>where
State: ExposedState,
Seal: ExposedSeal,
fn strict_type_info() -> TypeInfo<Self>
impl<State, Seal> Eq for Assign<State, Seal>where
State: ExposedState,
Seal: ExposedSeal,
Auto Trait Implementations§
impl<State, Seal> Freeze for Assign<State, Seal>
impl<State, Seal> RefUnwindSafe for Assign<State, Seal>where
<State as ExposedState>::Confidential: RefUnwindSafe,
Seal: RefUnwindSafe,
State: RefUnwindSafe,
impl<State, Seal> Send for Assign<State, Seal>
impl<State, Seal> Sync for Assign<State, Seal>
impl<State, Seal> Unpin for Assign<State, Seal>
impl<State, Seal> UnwindSafe for Assign<State, Seal>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.