pub struct OutputAssignment<State>where
State: KnownState,{
pub opout: Opout,
pub seal: ExplicitSeal<Txid>,
pub state: State,
pub witness: Option<Txid>,
pub bundle_id: Option<BundleId>,
}Fields§
§opout: Opout§seal: ExplicitSeal<Txid>§state: State§witness: Option<Txid>§bundle_id: Option<BundleId>Implementations§
Source§impl<State> OutputAssignment<State>where
State: KnownState,
impl<State> OutputAssignment<State>where
State: KnownState,
Sourcepub fn with_witness<Seal>(
seal: Seal,
witness_id: Txid,
state: State,
bundle_id: Option<BundleId>,
opid: OpId,
ty: AssignmentType,
no: u16,
) -> OutputAssignment<State>where
Seal: ExposedSeal,
pub fn with_witness<Seal>(
seal: Seal,
witness_id: Txid,
state: State,
bundle_id: Option<BundleId>,
opid: OpId,
ty: AssignmentType,
no: u16,
) -> OutputAssignment<State>where
Seal: ExposedSeal,
§Panics
If the processing is done on invalid stash data, the seal is witness-based and the anchor chain doesn’t match the seal chain.
Sourcepub fn with_no_witness<Seal>(
seal: Seal,
state: State,
bundle_id: Option<BundleId>,
opid: OpId,
ty: AssignmentType,
no: u16,
) -> OutputAssignment<State>where
Seal: ExposedSeal,
pub fn with_no_witness<Seal>(
seal: Seal,
state: State,
bundle_id: Option<BundleId>,
opid: OpId,
ty: AssignmentType,
no: u16,
) -> OutputAssignment<State>where
Seal: ExposedSeal,
§Panics
If the processing is done on invalid stash data, the seal is witness-based and the anchor chain doesn’t match the seal chain.
Sourcepub fn transmute<S>(self) -> OutputAssignment<S>where
S: KnownState + From<State>,
pub fn transmute<S>(self) -> OutputAssignment<S>where
S: KnownState + From<State>,
Transmutes output assignment from one form of state to another
pub fn check_witness(&self, filter: &HashMap<Txid, WitnessOrd>) -> bool
pub fn check_bundle(&self, invalid_bundles: &BTreeSet<BundleId>) -> bool
Trait Implementations§
Source§impl<State> Clone for OutputAssignment<State>where
State: Clone + KnownState,
impl<State> Clone for OutputAssignment<State>where
State: Clone + KnownState,
Source§fn clone(&self) -> OutputAssignment<State>
fn clone(&self) -> OutputAssignment<State>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<State> Debug for OutputAssignment<State>where
State: Debug + KnownState,
impl<State> Debug for OutputAssignment<State>where
State: Debug + KnownState,
Source§impl<'de, State> Deserialize<'de> for OutputAssignment<State>where
State: KnownState + Deserialize<'de>,
impl<'de, State> Deserialize<'de> for OutputAssignment<State>where
State: KnownState + Deserialize<'de>,
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<OutputAssignment<State>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<OutputAssignment<State>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<State> Hash for OutputAssignment<State>where
State: Hash + KnownState,
impl<State> Hash for OutputAssignment<State>where
State: Hash + KnownState,
Source§impl<State> Ord for OutputAssignment<State>where
State: KnownState,
impl<State> Ord for OutputAssignment<State>where
State: KnownState,
Source§fn cmp(&self, other: &OutputAssignment<State>) -> Ordering
fn cmp(&self, other: &OutputAssignment<State>) -> Ordering
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> PartialEq for OutputAssignment<State>where
State: KnownState,
impl<State> PartialEq for OutputAssignment<State>where
State: KnownState,
Source§impl<State> PartialOrd for OutputAssignment<State>where
State: KnownState,
impl<State> PartialOrd for OutputAssignment<State>where
State: KnownState,
Source§impl<State> Serialize for OutputAssignment<State>where
State: KnownState + Serialize,
impl<State> Serialize for OutputAssignment<State>where
State: KnownState + Serialize,
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> StrictDecode for OutputAssignment<State>where
State: KnownState,
impl<State> StrictDecode for OutputAssignment<State>where
State: KnownState,
fn strict_decode( reader: &mut impl TypedRead, ) -> Result<OutputAssignment<State>, DecodeError>
fn strict_read(reader: impl ReadRaw) -> Result<Self, DecodeError>
Source§impl<State> StrictDumb for OutputAssignment<State>where
State: KnownState,
impl<State> StrictDumb for OutputAssignment<State>where
State: KnownState,
fn strict_dumb() -> OutputAssignment<State>
Source§impl<State> StrictEncode for OutputAssignment<State>where
State: KnownState,
impl<State> StrictEncode for OutputAssignment<State>where
State: KnownState,
fn strict_encode<W>(&self, writer: W) -> Result<W, Error>where
W: TypedWrite,
fn strict_write(&self, writer: impl WriteRaw) -> Result<(), Error>
Source§impl<State> StrictStruct for OutputAssignment<State>where
State: KnownState,
impl<State> StrictStruct for OutputAssignment<State>where
State: KnownState,
const ALL_FIELDS: &'static [&'static str]
fn strict_check_fields()
fn strict_type_info() -> TypeInfo<Self>
Source§impl<State> StrictType for OutputAssignment<State>where
State: KnownState,
impl<State> StrictType for OutputAssignment<State>where
State: KnownState,
const STRICT_LIB_NAME: &'static str = LIB_NAME_RGB_OPS
fn strict_name() -> Option<TypeName>
impl<State> Copy for OutputAssignment<State>where
State: Copy + KnownState,
impl<State> Eq for OutputAssignment<State>where
State: Eq + KnownState,
impl<State> StrictProduct for OutputAssignment<State>where
State: KnownState,
Auto Trait Implementations§
impl<State> Freeze for OutputAssignment<State>where
State: Freeze,
impl<State> RefUnwindSafe for OutputAssignment<State>where
State: RefUnwindSafe,
impl<State> Send for OutputAssignment<State>where
State: Send,
impl<State> Sync for OutputAssignment<State>where
State: Sync,
impl<State> Unpin for OutputAssignment<State>where
State: Unpin,
impl<State> UnwindSafe for OutputAssignment<State>where
State: UnwindSafe,
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.