pub struct Assignments<Seal>(/* private fields */)
where
Seal: ExposedSeal;Implementations§
Source§impl Assignments<BlindSeal<Txid>>
impl Assignments<BlindSeal<Txid>>
pub fn transmutate_seals(&self) -> Assignments<BlindSeal<TxPtr>>
Methods from Deref<Target = Confined<BTreeMap<AssignmentType, TypedAssigns<Seal>>, amplify::::collection::confinement::SmallOrdMap::{constant#0}, amplify::::collection::confinement::SmallOrdMap::{constant#1}>>§
Sourcepub fn iter_mut(&'c mut self) -> <&'c mut C as IntoIterator>::IntoIter
pub fn iter_mut(&'c mut self) -> <&'c mut C as IntoIterator>::IntoIter
Returns an iterator that allows modifying each value.
The iterator yields all items from start to end.
Sourcepub fn values_mut(
&mut self,
) -> impl Iterator<Item = &mut <C as KeyedCollection>::Value>
pub fn values_mut( &mut self, ) -> impl Iterator<Item = &mut <C as KeyedCollection>::Value>
Returns an iterator that allows modifying each value for each key.
Sourcepub fn keyed_values_mut(
&mut self,
) -> impl Iterator<Item = (&<C as KeyedCollection>::Key, &mut <C as KeyedCollection>::Value)>
pub fn keyed_values_mut( &mut self, ) -> impl Iterator<Item = (&<C as KeyedCollection>::Key, &mut <C as KeyedCollection>::Value)>
Returns an iterator that allows modifying each value for each key.
Sourcepub fn as_inner(&self) -> &C
👎Deprecated since 4.7.0: use as_unconfined method
pub fn as_inner(&self) -> &C
Returns inner collection type
Sourcepub fn as_unconfined(&self) -> &C
pub fn as_unconfined(&self) -> &C
Returns reference to the inner collection type.
Sourcepub fn to_inner(&self) -> Cwhere
C: Clone,
👎Deprecated since 4.7.0: use to_unconfined method
pub fn to_inner(&self) -> Cwhere
C: Clone,
Clones inner collection type and returns it
Sourcepub fn to_unconfined(&self) -> Cwhere
C: Clone,
pub fn to_unconfined(&self) -> Cwhere
C: Clone,
Clones inner collection and returns an unconfined version of it.
Sourcepub fn push(&mut self, elem: <C as Collection>::Item) -> Result<(), Error>
pub fn push(&mut self, elem: <C as Collection>::Item) -> Result<(), Error>
Attempts to add a single element to the confined collection. Fails if the number of elements in the collection already maximal.
Sourcepub fn extend<T>(&mut self, iter: T) -> Result<(), Error>
pub fn extend<T>(&mut self, iter: T) -> Result<(), Error>
Attempts to add all elements from an iterator to the confined collection. Fails if the number of elements in the collection already maximal.
Sourcepub fn len_u8(&self) -> u8
pub fn len_u8(&self) -> u8
Returns number of elements in the confined collection as u8. The
confinement guarantees that the collection length can’t exceed
u8::MAX.
Sourcepub fn len_u16(&self) -> u16
pub fn len_u16(&self) -> u16
Returns number of elements in the confined collection as u16. The
confinement guarantees that the collection length can’t exceed
u16::MAX.
Sourcepub fn len_u24(&self) -> u24
pub fn len_u24(&self) -> u24
Returns number of elements in the confined collection as u24. The
confinement guarantees that the collection length can’t exceed
u24::MAX.
Sourcepub fn len_u32(&self) -> u32
pub fn len_u32(&self) -> u32
Returns number of elements in the confined collection as u32. The
confinement guarantees that the collection length can’t exceed
u32::MAX.
Sourcepub fn get_mut(
&mut self,
key: &<C as KeyedCollection>::Key,
) -> Option<&mut <C as KeyedCollection>::Value>
pub fn get_mut( &mut self, key: &<C as KeyedCollection>::Key, ) -> Option<&mut <C as KeyedCollection>::Value>
Gets mutable reference to an element of the collection.
Sourcepub fn insert(
&mut self,
key: <C as KeyedCollection>::Key,
value: <C as KeyedCollection>::Value,
) -> Result<Option<<C as KeyedCollection>::Value>, Error>
pub fn insert( &mut self, key: <C as KeyedCollection>::Key, value: <C as KeyedCollection>::Value, ) -> Result<Option<<C as KeyedCollection>::Value>, Error>
Inserts a new value into the confined collection under a given key. Fails if the collection already contains maximum number of elements allowed by the confinement.
Sourcepub fn entry(
&mut self,
key: <C as KeyedCollection>::Key,
) -> Result<<C as KeyedCollection>::Entry<'_>, Error>
pub fn entry( &mut self, key: <C as KeyedCollection>::Key, ) -> Result<<C as KeyedCollection>::Entry<'_>, Error>
Gets the given key’s corresponding entry in the map for in-place manipulation. Errors if the collection entry is vacant and the collection has already reached maximal size of its confinement.
Trait Implementations§
Source§impl<Seal> AsMut<<Assignments<Seal> as Wrapper>::Inner> for Assignments<Seal>where
Seal: ExposedSeal,
impl<Seal> AsMut<<Assignments<Seal> as Wrapper>::Inner> for Assignments<Seal>where
Seal: ExposedSeal,
Source§impl<Seal> AsRef<Confined<BTreeMap<AssignmentType, TypedAssigns<Seal>>, amplify::::collection::confinement::SmallOrdMap::{constant#0}, amplify::::collection::confinement::SmallOrdMap::{constant#1}>> for Assignments<Seal>where
Seal: ExposedSeal,
impl<Seal> AsRef<Confined<BTreeMap<AssignmentType, TypedAssigns<Seal>>, amplify::::collection::confinement::SmallOrdMap::{constant#0}, amplify::::collection::confinement::SmallOrdMap::{constant#1}>> for Assignments<Seal>where
Seal: ExposedSeal,
Source§fn as_ref(
&self,
) -> &Confined<BTreeMap<AssignmentType, TypedAssigns<Seal>>, amplify::::collection::confinement::SmallOrdMap::{constant#0}, amplify::::collection::confinement::SmallOrdMap::{constant#1}>
fn as_ref( &self, ) -> &Confined<BTreeMap<AssignmentType, TypedAssigns<Seal>>, amplify::::collection::confinement::SmallOrdMap::{constant#0}, amplify::::collection::confinement::SmallOrdMap::{constant#1}>
Source§impl<Seal> Borrow<Confined<BTreeMap<AssignmentType, TypedAssigns<Seal>>, amplify::::collection::confinement::SmallOrdMap::{constant#0}, amplify::::collection::confinement::SmallOrdMap::{constant#1}>> for Assignments<Seal>where
Seal: ExposedSeal,
impl<Seal> Borrow<Confined<BTreeMap<AssignmentType, TypedAssigns<Seal>>, amplify::::collection::confinement::SmallOrdMap::{constant#0}, amplify::::collection::confinement::SmallOrdMap::{constant#1}>> for Assignments<Seal>where
Seal: ExposedSeal,
Source§fn borrow(
&self,
) -> &Confined<BTreeMap<AssignmentType, TypedAssigns<Seal>>, amplify::::collection::confinement::SmallOrdMap::{constant#0}, amplify::::collection::confinement::SmallOrdMap::{constant#1}>
fn borrow( &self, ) -> &Confined<BTreeMap<AssignmentType, TypedAssigns<Seal>>, amplify::::collection::confinement::SmallOrdMap::{constant#0}, amplify::::collection::confinement::SmallOrdMap::{constant#1}>
Source§impl<Seal> BorrowMut<<Assignments<Seal> as Wrapper>::Inner> for Assignments<Seal>where
Seal: ExposedSeal,
impl<Seal> BorrowMut<<Assignments<Seal> as Wrapper>::Inner> for Assignments<Seal>where
Seal: ExposedSeal,
Source§fn borrow_mut(&mut self) -> &mut <Assignments<Seal> as Wrapper>::Inner
fn borrow_mut(&mut self) -> &mut <Assignments<Seal> as Wrapper>::Inner
Source§impl<Seal> Clone for Assignments<Seal>where
Seal: Clone + ExposedSeal,
impl<Seal> Clone for Assignments<Seal>where
Seal: Clone + ExposedSeal,
Source§fn clone(&self) -> Assignments<Seal>
fn clone(&self) -> Assignments<Seal>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<Seal> Debug for Assignments<Seal>where
Seal: Debug + ExposedSeal,
impl<Seal> Debug for Assignments<Seal>where
Seal: Debug + ExposedSeal,
Source§impl<Seal> Default for Assignments<Seal>where
Seal: ExposedSeal,
impl<Seal> Default for Assignments<Seal>where
Seal: ExposedSeal,
Source§fn default() -> Assignments<Seal>
fn default() -> Assignments<Seal>
Source§impl<Seal> Deref for Assignments<Seal>where
Seal: ExposedSeal,
impl<Seal> Deref for Assignments<Seal>where
Seal: ExposedSeal,
Source§type Target = Confined<BTreeMap<AssignmentType, TypedAssigns<Seal>>, amplify::::collection::confinement::SmallOrdMap::{constant#0}, amplify::::collection::confinement::SmallOrdMap::{constant#1}>
type Target = Confined<BTreeMap<AssignmentType, TypedAssigns<Seal>>, amplify::::collection::confinement::SmallOrdMap::{constant#0}, amplify::::collection::confinement::SmallOrdMap::{constant#1}>
Source§impl<Seal> DerefMut for Assignments<Seal>where
Seal: ExposedSeal,
impl<Seal> DerefMut for Assignments<Seal>where
Seal: ExposedSeal,
Source§impl<'de, Seal> Deserialize<'de> for Assignments<Seal>
impl<'de, Seal> Deserialize<'de> for Assignments<Seal>
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Assignments<Seal>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Assignments<Seal>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl<'op> From<&'op Assignments<BlindSeal<TxPtr>>> for AssignmentsRef<'op>
impl<'op> From<&'op Assignments<BlindSeal<TxPtr>>> for AssignmentsRef<'op>
Source§fn from(v: &'op Assignments<BlindSeal<TxPtr>>) -> AssignmentsRef<'op>
fn from(v: &'op Assignments<BlindSeal<TxPtr>>) -> AssignmentsRef<'op>
Source§impl<'op> From<&'op Assignments<BlindSeal<Txid>>> for AssignmentsRef<'op>
impl<'op> From<&'op Assignments<BlindSeal<Txid>>> for AssignmentsRef<'op>
Source§fn from(v: &'op Assignments<BlindSeal<Txid>>) -> AssignmentsRef<'op>
fn from(v: &'op Assignments<BlindSeal<Txid>>) -> AssignmentsRef<'op>
Source§impl<Seal> From<Assignments<Seal>> for Confined<BTreeMap<AssignmentType, TypedAssigns<Seal>>, amplify::::collection::confinement::SmallOrdMap::{constant#0}, amplify::::collection::confinement::SmallOrdMap::{constant#1}>where
Seal: ExposedSeal,
impl<Seal> From<Assignments<Seal>> for Confined<BTreeMap<AssignmentType, TypedAssigns<Seal>>, amplify::::collection::confinement::SmallOrdMap::{constant#0}, amplify::::collection::confinement::SmallOrdMap::{constant#1}>where
Seal: ExposedSeal,
Source§fn from(
wrapped: Assignments<Seal>,
) -> Confined<BTreeMap<AssignmentType, TypedAssigns<Seal>>, amplify::::collection::confinement::SmallOrdMap::{constant#0}, amplify::::collection::confinement::SmallOrdMap::{constant#1}>
fn from( wrapped: Assignments<Seal>, ) -> Confined<BTreeMap<AssignmentType, TypedAssigns<Seal>>, amplify::::collection::confinement::SmallOrdMap::{constant#0}, amplify::::collection::confinement::SmallOrdMap::{constant#1}>
Source§impl<Seal> From<Confined<BTreeMap<AssignmentType, TypedAssigns<Seal>>, amplify::::collection::confinement::SmallOrdMap::{constant#0}, amplify::::collection::confinement::SmallOrdMap::{constant#1}>> for Assignments<Seal>where
Seal: ExposedSeal,
impl<Seal> From<Confined<BTreeMap<AssignmentType, TypedAssigns<Seal>>, amplify::::collection::confinement::SmallOrdMap::{constant#0}, amplify::::collection::confinement::SmallOrdMap::{constant#1}>> for Assignments<Seal>where
Seal: ExposedSeal,
Source§fn from(
v: Confined<BTreeMap<AssignmentType, TypedAssigns<Seal>>, amplify::::collection::confinement::SmallOrdMap::{constant#0}, amplify::::collection::confinement::SmallOrdMap::{constant#1}>,
) -> Assignments<Seal>
fn from( v: Confined<BTreeMap<AssignmentType, TypedAssigns<Seal>>, amplify::::collection::confinement::SmallOrdMap::{constant#0}, amplify::::collection::confinement::SmallOrdMap::{constant#1}>, ) -> Assignments<Seal>
Source§impl<Seal> IntoIterator for Assignments<Seal>where
Seal: ExposedSeal,
impl<Seal> IntoIterator for Assignments<Seal>where
Seal: ExposedSeal,
Source§type Item = (AssignmentType, TypedAssigns<Seal>)
type Item = (AssignmentType, TypedAssigns<Seal>)
Source§type IntoIter = IntoIter<AssignmentType, TypedAssigns<Seal>>
type IntoIter = IntoIter<AssignmentType, TypedAssigns<Seal>>
Source§fn into_iter(self) -> <Assignments<Seal> as IntoIterator>::IntoIter
fn into_iter(self) -> <Assignments<Seal> as IntoIterator>::IntoIter
Source§impl<Seal> MergeReveal for Assignments<Seal>where
Seal: ExposedSeal,
impl<Seal> MergeReveal for Assignments<Seal>where
Seal: ExposedSeal,
fn merge_reveal( &mut self, other: &Assignments<Seal>, ) -> Result<(), MergeRevealError>
Source§impl<Seal> MerkleLeaves for Assignments<Seal>where
Seal: ExposedSeal,
impl<Seal> MerkleLeaves for Assignments<Seal>where
Seal: ExposedSeal,
type Leaf = AssignmentCommitment
type LeafIter<'tmp> = IntoIter<AssignmentCommitment> where Seal: 'tmp
fn merkle_leaves(&self) -> <Assignments<Seal> as MerkleLeaves>::LeafIter<'_>
Source§impl<Seal> PartialEq for Assignments<Seal>where
Seal: PartialEq + ExposedSeal,
impl<Seal> PartialEq for Assignments<Seal>where
Seal: PartialEq + ExposedSeal,
Source§impl<Seal> Serialize for Assignments<Seal>
impl<Seal> Serialize for Assignments<Seal>
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,
Source§impl<Seal> StrictDecode for Assignments<Seal>where
Seal: ExposedSeal,
impl<Seal> StrictDecode for Assignments<Seal>where
Seal: ExposedSeal,
fn strict_decode( reader: &mut impl TypedRead, ) -> Result<Assignments<Seal>, DecodeError>
fn strict_read(reader: impl ReadRaw) -> Result<Self, DecodeError>
Source§impl<Seal> StrictEncode for Assignments<Seal>where
Seal: ExposedSeal,
impl<Seal> StrictEncode for Assignments<Seal>where
Seal: ExposedSeal,
fn strict_encode<W>(&self, writer: W) -> Result<W, Error>where
W: TypedWrite,
fn strict_write(&self, writer: impl WriteRaw) -> Result<(), Error>
Source§impl<Seal> StrictTuple for Assignments<Seal>where
Seal: ExposedSeal,
impl<Seal> StrictTuple for Assignments<Seal>where
Seal: ExposedSeal,
const FIELD_COUNT: u8 = 1u8
fn strict_check_fields()
fn strict_type_info() -> TypeInfo<Self>
Source§impl<Seal> StrictType for Assignments<Seal>where
Seal: ExposedSeal,
impl<Seal> StrictType for Assignments<Seal>where
Seal: ExposedSeal,
const STRICT_LIB_NAME: &'static str = LIB_NAME_RGB_COMMIT
fn strict_name() -> Option<TypeName>
Source§impl<Seal> Wrapper for Assignments<Seal>where
Seal: ExposedSeal,
impl<Seal> Wrapper for Assignments<Seal>where
Seal: ExposedSeal,
Source§type Inner = Confined<BTreeMap<AssignmentType, TypedAssigns<Seal>>, amplify::::collection::confinement::SmallOrdMap::{constant#0}, amplify::::collection::confinement::SmallOrdMap::{constant#1}>
type Inner = Confined<BTreeMap<AssignmentType, TypedAssigns<Seal>>, amplify::::collection::confinement::SmallOrdMap::{constant#0}, amplify::::collection::confinement::SmallOrdMap::{constant#1}>
Source§fn from_inner(inner: <Assignments<Seal> as Wrapper>::Inner) -> Assignments<Seal>
fn from_inner(inner: <Assignments<Seal> as Wrapper>::Inner) -> Assignments<Seal>
Source§fn as_inner(&self) -> &<Assignments<Seal> as Wrapper>::Inner
fn as_inner(&self) -> &<Assignments<Seal> as Wrapper>::Inner
Source§fn into_inner(self) -> <Assignments<Seal> as Wrapper>::Inner
fn into_inner(self) -> <Assignments<Seal> as Wrapper>::Inner
Source§impl<Seal> WrapperMut for Assignments<Seal>where
Seal: ExposedSeal,
impl<Seal> WrapperMut for Assignments<Seal>where
Seal: ExposedSeal,
Source§fn as_inner_mut(&mut self) -> &mut <Assignments<Seal> as Wrapper>::Inner
fn as_inner_mut(&mut self) -> &mut <Assignments<Seal> as Wrapper>::Inner
impl<Seal> DefaultBasedStrictDumb for Assignments<Seal>where
Seal: ExposedSeal,
impl<Seal> Eq for Assignments<Seal>where
Seal: Eq + ExposedSeal,
impl<Seal> StrictProduct for Assignments<Seal>where
Seal: ExposedSeal,
impl<Seal> StructuralPartialEq for Assignments<Seal>where
Seal: ExposedSeal,
Auto Trait Implementations§
impl<Seal> Freeze for Assignments<Seal>
impl<Seal> RefUnwindSafe for Assignments<Seal>where
Seal: RefUnwindSafe,
impl<Seal> Send for Assignments<Seal>where
Seal: Send,
impl<Seal> Sync for Assignments<Seal>where
Seal: Sync,
impl<Seal> Unpin for Assignments<Seal>
impl<Seal> UnwindSafe for Assignments<Seal>where
Seal: RefUnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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
key and return true if they are equal.