Struct rgb::contract::Metadata[][src]

pub struct Metadata(_);
Expand description

Transition & genesis metadata fields

Implementations

impl Metadata[src]

pub fn u8(&self, field_type: FieldType) -> Vec<u8>[src]

pub fn u16(&self, field_type: FieldType) -> Vec<u16>[src]

pub fn u32(&self, field_type: FieldType) -> Vec<u32>[src]

pub fn u64(&self, field_type: FieldType) -> Vec<u64>[src]

pub fn i8(&self, field_type: FieldType) -> Vec<i8>[src]

pub fn i16(&self, field_type: FieldType) -> Vec<i16>[src]

pub fn i32(&self, field_type: FieldType) -> Vec<i32>[src]

pub fn i64(&self, field_type: FieldType) -> Vec<i64>[src]

pub fn f32(&self, field_type: FieldType) -> Vec<f32>[src]

pub fn f64(&self, field_type: FieldType) -> Vec<f64>[src]

pub fn bytes(&self, field_type: FieldType) -> Vec<Vec<u8>>[src]

pub fn string(&self, field_type: FieldType) -> Vec<String>[src]

Trait Implementations

impl AsMut<<Metadata as Wrapper>::Inner> for Metadata[src]

fn as_mut(&mut self) -> &mut Self::Inner[src]

Performs the conversion.

impl AsRef<<Metadata as Wrapper>::Inner> for Metadata[src]

fn as_ref(&self) -> &Self::Inner[src]

Performs the conversion.

impl Borrow<<Metadata as Wrapper>::Inner> for Metadata[src]

fn borrow(&self) -> &Self::Inner[src]

Immutably borrows from an owned value. Read more

impl BorrowMut<<Metadata as Wrapper>::Inner> for Metadata[src]

fn borrow_mut(&mut self) -> &mut Self::Inner[src]

Mutably borrows from an owned value. Read more

impl Clone for Metadata[src]

fn clone(&self) -> Metadata[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for Metadata[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl Default for Metadata[src]

fn default() -> Metadata[src]

Returns the “default value” for a type. Read more

impl Deref for Metadata[src]

type Target = Self::Inner

The resulting type after dereferencing.

fn deref(&self) -> &Self::Target[src]

Dereferences the value.

impl DerefMut for Metadata[src]

fn deref_mut(&mut self) -> &mut Self::Target[src]

Mutably dereferences the value.

impl<'de> Deserialize<'de> for Metadata[src]

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
    __D: Deserializer<'de>, 
[src]

Deserialize this value from the given Serde deserializer. Read more

impl Display for Metadata[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl From<BTreeMap<usize, BTreeSet<Revealed>>> for Metadata[src]

fn from(v: BTreeMap<FieldType, BTreeSet<Revealed>>) -> Self[src]

Performs the conversion.

impl IntoIterator for Metadata[src]

type Item = <BTreeMap<FieldType, BTreeSet<Revealed>> as IntoIterator>::Item

The type of the elements being iterated over.

type IntoIter = <BTreeMap<FieldType, BTreeSet<Revealed>> as IntoIterator>::IntoIter

Which kind of iterator are we turning this into?

fn into_iter(self) -> Self::IntoIter[src]

Creates an iterator from a value. Read more

impl PartialEq<Metadata> for Metadata[src]

fn eq(&self, other: &Metadata) -> bool[src]

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, other: &Metadata) -> bool[src]

This method tests for !=.

impl Serialize for Metadata[src]

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
    __S: Serializer
[src]

Serialize this value into the given Serde serializer. Read more

impl StrictDecode for Metadata[src]

fn strict_decode<D: Read>(d: D) -> Result<Self, Error>[src]

Decode with the given [std::io::Reader] instance; must either construct an instance or return implementation-specific error type. Read more

fn strict_deserialize(data: impl AsRef<[u8]>) -> Result<Self, Error>[src]

Tries to deserialize byte array into the current type using [strict_decode()] Read more

impl StrictEncode for Metadata[src]

fn strict_encode<E: Write>(&self, e: E) -> Result<usize, Error>[src]

Encode with the given [std::io::Writer] instance; must return result with either amount of bytes encoded – or implementation-specific error type. Read more

fn strict_serialize(&self) -> Result<Vec<u8, Global>, Error>[src]

Serializes data as a byte array using [strict_encode()] function

impl ToMerkleSource for Metadata[src]

type Leaf = MetadataLeaf

fn to_merkle_source(&self) -> MerkleSource<Self::Leaf>[src]

impl Wrapper for Metadata[src]

type Inner = BTreeMap<FieldType, BTreeSet<Revealed>>

Inner type wrapped by the current newtype

fn from_inner(inner: Self::Inner) -> Self[src]

Instantiates wrapper type with the inner data

fn as_inner(&self) -> &Self::Inner[src]

Returns reference to the inner representation for the wrapper type

fn as_inner_mut(&mut self) -> &mut Self::Inner[src]

Returns a mutable reference to the inner representation for the wrapper type Read more

fn into_inner(self) -> Self::Inner[src]

Unwraps the wrapper returning the inner type

fn to_inner(&self) -> Self::Inner[src]

Clones inner data of the wrapped type and return them

fn copy(&self) -> Self where
    Self::Inner: Copy
[src]

Copies the wrapped type

impl Eq for Metadata[src]

impl StructuralEq for Metadata[src]

impl StructuralPartialEq for Metadata[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

Creates owned data from borrowed data, usually by cloning. Read more

pub fn clone_into(&self, target: &mut T)[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

impl<T> ToString for T where
    T: Display + ?Sized
[src]

pub default fn to_string(&self) -> String[src]

Converts the given value to a String. Read more

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

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]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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]

Performs the conversion.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

pub fn vzip(self) -> V

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]