Enum rgb::bech32::Bech32[][src]

pub enum Bech32 {
Show variants PedersenCommitment(Commitment), Bulletproof(RangeProof), Curve25519Pk(PublicKey), Ed25519Sign(Signature), BlindedUtxo(Confidential), SchemaId(SchemaId), Schema(Schema), ContractId(ContractId), Genesis(Genesis), Transition(Transition), Extension(Extension), Anchor(Anchor), Disclosure(Disclosure), Other(StringVec<u8>),
}
Expand description

Bech32 representation of generic RGB data, that can be generated from some string basing on Bech32 HRP value.

Variants

PedersenCommitment(Commitment)
Expand description

Pedersen commitment

HRP: pedersen

Bulletproof(RangeProof)
Expand description

Bulletproofs

HRP: bulletproof

Curve25519Pk(PublicKey)
Expand description

Curve25519 public key

HRP: curve25519pk

Ed25519Sign(Signature)
Expand description

Ed25519 signature

HRP: ed25519sign

BlindedUtxo(Confidential)
Expand description

Blinded UTXO for assigning RGB state to.

HRP: utxob

SchemaId(SchemaId)
Expand description

RGB Schema ID (hash of the schema data).

HRP: sch

Schema(Schema)
Expand description

RGB Schema raw data (hash of the genesis).

HRP: schema

ContractId(ContractId)
Expand description

RGB Contract ID (hash of the genesis).

HRP: rgb

Genesis(Genesis)
Expand description

RGB Contract genesis raw data

HRP: genesis

Transition(Transition)
Expand description

Raw data of state transition under some RGB contract

HRP: transition

Extension(Extension)
Expand description

Raw data of state extension under some RGB contract

HRP: statex

Anchor(Anchor)
Expand description

Anchor data for some dterministic bitcoin commitment

HRP: anchor

Disclosure(Disclosure)
Expand description

Disclosure data revealing some specific confidential information about RGB contract

HRP: disclosure

Other(StringVec<u8>)
Expand description

Binary data for unknown Bech32 HRPs

Implementations

impl Bech32[src]

pub const HRP_PEDERSEN: &'static str[src]

HRP for a Bech32-encoded Pedersen commitment

pub const HRP_BULLETPROOF: &'static str[src]

HRP for a Bech32-encoded blinded bulletproof range proof data

pub const HRP_CURVE25519OPK: &'static str[src]

HRP for a Bech32-encoded blinded bulletproof range proof data

pub const HRP_ED25519OSIGN: &'static str[src]

HRP for a Bech32-encoded blinded bulletproof range proof data

pub const HRP_OUTPOINT: &'static str[src]

HRP for a Bech32-encoded blinded UTXO data

pub const HRP_SCHEMA_ID: &'static str[src]

Bech32 HRP for RGB schema ID encoding

pub const HRP_CONTRACT_ID: &'static str[src]

Bech32 HRP for RGB contract ID encoding

pub const HRP_SCHEMA: &'static str[src]

HRP for a Bech32-encoded raw RGB schema data

pub const HRP_GENESIS: &'static str[src]

HRP for a Bech32-encoded raw RGB contract genesis data

pub const HRP_TRANSITION: &'static str[src]

HRP for a Bech32-encoded raw RGB state transition data

pub const HRP_EXTENSION: &'static str[src]

HRP for a Bech32-encoded raw RGB state extension data

pub const HRP_ANCHOR: &'static str[src]

HRP for a Bech32-encoded deterministic bitcoin commitments anchor data

pub const HRP_DISCLOSURE: &'static str[src]

HRP for a Bech32-encoded RGB disclosure data

Trait Implementations

impl Clone for Bech32[src]

fn clone(&self) -> Bech32[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 Bech32[src]

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

Formats the value using the given formatter. Read more

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

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

Formats the value using the given formatter. Read more

impl From<Anchor> for Bech32[src]

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

Performs the conversion.

impl From<Commitment> for Bech32[src]

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

Performs the conversion.

impl From<ContractId> for Bech32[src]

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

Performs the conversion.

impl From<Disclosure> for Bech32[src]

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

Performs the conversion.

impl From<Extension> for Bech32[src]

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

Performs the conversion.

impl From<Genesis> for Bech32[src]

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

Performs the conversion.

impl From<OutpointHash> for Bech32[src]

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

Performs the conversion.

impl From<PublicKey> for Bech32[src]

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

Performs the conversion.

impl From<RangeProof> for Bech32[src]

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

Performs the conversion.

impl From<Schema> for Bech32[src]

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

Performs the conversion.

impl From<SchemaId> for Bech32[src]

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

Performs the conversion.

impl From<Signature> for Bech32[src]

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

Performs the conversion.

impl From<Transition> for Bech32[src]

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

Performs the conversion.

impl FromStr for Bech32[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 Serialize for Bech32[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 TryFrom<Bech32> for Commitment[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 TryFrom<Bech32> for RangeProof[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 TryFrom<Bech32> for Disclosure[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 TryFrom<Bech32> for Confidential[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 TryFrom<Bech32> for ContractId[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 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 TryFrom<Bech32> for Schema[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 TryFrom<Bech32> for Genesis[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 TryFrom<Bech32> for Extension[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 TryFrom<Bech32> for Transition[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 TryFrom<Bech32> for Anchor[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.

Auto Trait Implementations

impl RefUnwindSafe for Bech32

impl Send for Bech32

impl Sync for Bech32

impl Unpin for Bech32

impl UnwindSafe for Bech32

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> 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> 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]