pub struct MetaValue(/* private fields */);Methods from Deref<Target = Confined<Vec<u8>, amplify::::collection::confinement::SmallBlob::{constant#0}, amplify::::collection::confinement::SmallBlob::{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.
Sourcepub fn get_mut<I>(
&mut self,
index: I,
) -> Option<&mut <I as SliceIndex<[T]>>::Output>where
I: SliceIndex<[T]>,
pub fn get_mut<I>(
&mut self,
index: I,
) -> Option<&mut <I as SliceIndex<[T]>>::Output>where
I: SliceIndex<[T]>,
Gets the mutable element of a vector
Sourcepub fn pop(&mut self) -> Option<T>
pub fn pop(&mut self) -> Option<T>
Removes the last element from a vector and returns it, or None if it
is empty.
Trait Implementations§
Source§impl AsRef<Confined<Vec<u8>, amplify::::collection::confinement::SmallBlob::{constant#0}, amplify::::collection::confinement::SmallBlob::{constant#1}>> for MetaValue
impl AsRef<Confined<Vec<u8>, amplify::::collection::confinement::SmallBlob::{constant#0}, amplify::::collection::confinement::SmallBlob::{constant#1}>> for MetaValue
Source§impl Borrow<Confined<Vec<u8>, amplify::::collection::confinement::SmallBlob::{constant#0}, amplify::::collection::confinement::SmallBlob::{constant#1}>> for MetaValue
impl Borrow<Confined<Vec<u8>, amplify::::collection::confinement::SmallBlob::{constant#0}, amplify::::collection::confinement::SmallBlob::{constant#1}>> for MetaValue
Source§impl<'de> Deserialize<'de> for MetaValue
impl<'de> Deserialize<'de> for MetaValue
Source§fn deserialize<D>(
deserializer: D,
) -> Result<MetaValue, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<MetaValue, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Source§impl From<Confined<Vec<u8>, amplify::::collection::confinement::SmallBlob::{constant#0}, amplify::::collection::confinement::SmallBlob::{constant#1}>> for MetaValue
impl From<Confined<Vec<u8>, amplify::::collection::confinement::SmallBlob::{constant#0}, amplify::::collection::confinement::SmallBlob::{constant#1}>> for MetaValue
Source§impl From<MetaValue> for Confined<Vec<u8>, amplify::::collection::confinement::SmallBlob::{constant#0}, amplify::::collection::confinement::SmallBlob::{constant#1}>
impl From<MetaValue> for Confined<Vec<u8>, amplify::::collection::confinement::SmallBlob::{constant#0}, amplify::::collection::confinement::SmallBlob::{constant#1}>
Source§impl Ord for MetaValue
impl Ord for MetaValue
Source§impl PartialOrd for MetaValue
impl PartialOrd for MetaValue
Source§impl Serialize for MetaValue
impl Serialize for MetaValue
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 StrictDecode for MetaValue
impl StrictDecode for MetaValue
fn strict_decode(reader: &mut impl TypedRead) -> Result<MetaValue, DecodeError>
fn strict_read(reader: impl ReadRaw) -> Result<Self, DecodeError>
Source§impl StrictEncode for MetaValue
impl StrictEncode for MetaValue
fn strict_encode<W>(&self, writer: W) -> Result<W, Error>where
W: TypedWrite,
fn strict_write(&self, writer: impl WriteRaw) -> Result<(), Error>
Source§impl StrictTuple for MetaValue
impl StrictTuple for MetaValue
const FIELD_COUNT: u8 = 1u8
fn strict_check_fields()
fn strict_type_info() -> TypeInfo<Self>
Source§impl StrictType for MetaValue
impl StrictType for MetaValue
const STRICT_LIB_NAME: &'static str = LIB_NAME_RGB_COMMIT
fn strict_name() -> Option<TypeName>
Source§impl Wrapper for MetaValue
impl Wrapper for MetaValue
Source§type Inner = Confined<Vec<u8>, amplify::::collection::confinement::SmallBlob::{constant#0}, amplify::::collection::confinement::SmallBlob::{constant#1}>
type Inner = Confined<Vec<u8>, amplify::::collection::confinement::SmallBlob::{constant#0}, amplify::::collection::confinement::SmallBlob::{constant#1}>
Source§fn from_inner(inner: <MetaValue as Wrapper>::Inner) -> MetaValue
fn from_inner(inner: <MetaValue as Wrapper>::Inner) -> MetaValue
Source§fn as_inner(&self) -> &<MetaValue as Wrapper>::Inner
fn as_inner(&self) -> &<MetaValue as Wrapper>::Inner
Source§fn into_inner(self) -> <MetaValue as Wrapper>::Inner
fn into_inner(self) -> <MetaValue as Wrapper>::Inner
Source§impl WrapperMut for MetaValue
impl WrapperMut for MetaValue
impl DefaultBasedStrictDumb for MetaValue
impl Eq for MetaValue
impl StrictProduct for MetaValue
impl StructuralPartialEq for MetaValue
Auto Trait Implementations§
impl Freeze for MetaValue
impl RefUnwindSafe for MetaValue
impl Send for MetaValue
impl Sync for MetaValue
impl Unpin for MetaValue
impl UnwindSafe for MetaValue
Blanket Implementations§
Source§impl<T> Base32Len for T
impl<T> Base32Len for T
Source§fn base32_len(&self) -> usize
fn base32_len(&self) -> usize
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> CheckBase32<Vec<u5>> for T
impl<T> CheckBase32<Vec<u5>> for T
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
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> StrictDumb for T
impl<T> StrictDumb for T
fn strict_dumb() -> T
Source§impl<T> ToBase32 for T
impl<T> ToBase32 for T
Source§fn write_base32<W>(&self, writer: &mut W) -> Result<(), <W as WriteBase32>::Err>where
W: WriteBase32,
fn write_base32<W>(&self, writer: &mut W) -> Result<(), <W as WriteBase32>::Err>where
W: WriteBase32,
Source§impl<T> ToHex for T
impl<T> ToHex for T
Source§fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
self into the result. Lower case
letters are used (e.g. f9b4ca)Source§fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
self into the result. Upper case
letters are used (e.g. F9B4CA)