Struct rgb::schema::SchemaId[][src]

pub struct SchemaId(_);
Expand description

Commitment-based schema identifier used for committing to the schema type

Trait Implementations

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

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

Performs the conversion.

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

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

Performs the conversion.

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

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

Immutably borrows from an owned value. Read more

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

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

Mutably borrows from an owned value. Read more

impl Clone for SchemaId[src]

fn clone(&self) -> SchemaId[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<MSG> CommitVerify<MSG> for SchemaId where
    MSG: AsRef<[u8]>, 
[src]

fn commit(msg: &MSG) -> SchemaId[src]

Creates a commitment to a byte representation of a given message

fn verify(&self, msg: &MSG) -> bool

Verifies commitment against the message; default implementation just repeats the commitment to the message and check it against the self. Read more

impl Debug for SchemaId[src]

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

Formats the value using the given formatter. Read more

impl Default for SchemaId[src]

fn default() -> SchemaId[src]

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

impl Deref for SchemaId[src]

type Target = Self::Inner

The resulting type after dereferencing.

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

Dereferences the value.

impl DerefMut for SchemaId[src]

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

Mutably dereferences the value.

impl<'de> Deserialize<'de> for SchemaId[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 SchemaId[src]

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

Formats the value using the given formatter. Read more

impl From<Hash<SchemaIdTag>> for SchemaId[src]

fn from(v: Hash<SchemaIdTag>) -> Self[src]

Performs the conversion.

impl From<SchemaId> for Bech32[src]

fn from(v: SchemaId) -> Self[src]

Performs the conversion.

impl FromStr for SchemaId[src]

type Err = Error

The associated error which can be returned from parsing.

fn from_str(s: &str) -> Result<Self, Self::Err>[src]

Parses a string s to return a value of this type. Read more

impl Hash for SchemaId[src]

fn hash<__H: Hasher>(&self, state: &mut __H)[src]

Feeds this value into the given Hasher. Read more

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0[src]

Feeds a slice of this type into the given Hasher. Read more

impl Index<Range<usize>> for SchemaId[src]

type Output = <Self::Inner as Index<Range<usize>>>::Output

The returned type after indexing.

fn index(&self, index: Range<usize>) -> &Self::Output[src]

Performs the indexing (container[index]) operation. Read more

impl Index<RangeFrom<usize>> for SchemaId[src]

type Output = <Self::Inner as Index<RangeFrom<usize>>>::Output

The returned type after indexing.

fn index(&self, index: RangeFrom<usize>) -> &Self::Output[src]

Performs the indexing (container[index]) operation. Read more

impl Index<RangeFull> for SchemaId[src]

type Output = <Self::Inner as Index<RangeFull>>::Output

The returned type after indexing.

fn index(&self, index: RangeFull) -> &Self::Output[src]

Performs the indexing (container[index]) operation. Read more

impl Index<RangeTo<usize>> for SchemaId[src]

type Output = <Self::Inner as Index<RangeTo<usize>>>::Output

The returned type after indexing.

fn index(&self, index: RangeTo<usize>) -> &Self::Output[src]

Performs the indexing (container[index]) operation. Read more

impl Index<usize> for SchemaId[src]

type Output = <Self::Inner as Index<usize>>::Output

The returned type after indexing.

fn index(&self, index: usize) -> &Self::Output[src]

Performs the indexing (container[index]) operation. Read more

impl LowerHex for SchemaId[src]

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

Formats the value using the given formatter.

impl Ord for SchemaId[src]

fn cmp(&self, other: &SchemaId) -> Ordering[src]

This method returns an Ordering between self and other. Read more

#[must_use]
fn max(self, other: Self) -> Self
1.21.0[src]

Compares and returns the maximum of two values. Read more

#[must_use]
fn min(self, other: Self) -> Self
1.21.0[src]

Compares and returns the minimum of two values. Read more

#[must_use]
fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]

Restrict a value to a certain interval. Read more

impl PartialEq<SchemaId> for SchemaId[src]

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

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

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

This method tests for !=.

impl PartialOrd<SchemaId> for SchemaId[src]

fn partial_cmp(&self, other: &SchemaId) -> Option<Ordering>[src]

This method returns an ordering between self and other values if one exists. Read more

#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than (for self and other) and is used by the < operator. Read more

#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl Serialize for SchemaId[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 Strategy for SchemaId[src]

impl TryFrom<Bech32> for SchemaId[src]

type Error = Error

The type returned in the event of a conversion error.

fn try_from(bech32: Bech32) -> Result<Self, Self::Error>[src]

Performs the conversion.

impl Wrapper for SchemaId[src]

type Inner = Hash<SchemaIdTag>

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 Copy for SchemaId[src]

impl Eq for SchemaId[src]

impl StructuralEq for SchemaId[src]

impl StructuralPartialEq for SchemaId[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> FromBech32 for T where
    T: TryFrom<Bech32, Error = Error>, 
[src]

pub fn from_bech32(Bech32) -> Result<T, Error>[src]

Unwraps Bech32 enum data into a concrete type, if any, or fails with Error::WrongType otherwise Read more

fn from_bech32_str(s: &str) -> Result<Self, Error>[src]

Tries to read Bech32-encoded data from s argument, checks it’s type and constructs object if HRP corresponds to the type implementing this trait. Fails with [Error] type Read more

impl<T, Tag> FromBech32IdStr<Tag> for T where
    T: HashType<Tag>,
    Tag: Tag
[src]

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<'a, U, T> TaggedHash<'a, T> for U where
    T: 'a + Tag,
    U: Wrapper<Inner = Hash<T>>, 
[src]

fn hash(msg: impl AsRef<[u8]>) -> Self[src]

fn from_hash<X>(hash: X) -> Self where
    X: Hash<Inner = [u8; 32]>, 
[src]

fn as_slice(&'a self) -> &'a [u8; 32][src]

fn from_hex(hex: &str) -> Result<Self, Error>[src]

impl<T> ToBech32 for T where
    T: Into<Bech32> + Clone
[src]

pub fn to_bech32(&Self) -> Bech32[src]

Returns Bech32 enum variant for this specific type

fn to_bech32_string(&self) -> String[src]

Converts type to it’s Bech32-encoded representation. Default implementation constructs Bech32 object and converts it to string. Read more

impl<T, Tag> ToBech32IdString<Tag> for T where
    T: HashType<Tag>,
    Tag: Tag
[src]

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

Returns Bech32-encoded string in form of id1... representing the type

impl<T> ToHex for T where
    T: LowerHex
[src]

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

Outputs the hash in hexadecimal form

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]