bc_components

Trait ReferenceProvider

Source
pub trait ReferenceProvider {
    // Required method
    fn reference(&self) -> Reference;

    // Provided methods
    fn ref_hex(&self) -> String { ... }
    fn ref_data_short(&self) -> [u8; 4] { ... }
    fn ref_hex_short(&self) -> String { ... }
    fn ref_bytewords(&self, prefix: Option<&str>) -> String { ... }
    fn ref_bytemoji(&self, prefix: Option<&str>) -> String { ... }
}
Expand description

Implementers of this trait provide a globally unique reference to themselves.

Required Methods§

Provided Methods§

Source

fn ref_hex(&self) -> String

The data as a hexadecimal string.

Source

fn ref_data_short(&self) -> [u8; 4]

The first four bytes of the reference

Source

fn ref_hex_short(&self) -> String

The first four bytes of the reference as a hexadecimal string.

Source

fn ref_bytewords(&self, prefix: Option<&str>) -> String

The first four bytes of the reference as upper-case ByteWords.

Source

fn ref_bytemoji(&self, prefix: Option<&str>) -> String

The first four bytes of the reference as Bytemoji.

Implementors§

Source§

impl ReferenceProvider for PublicKeyBase

Source§

impl ReferenceProvider for Reference

Implement the ReferenceProvider trait for Reference.

Yes, this creates a Reference to a Reference.

Source§

impl ReferenceProvider for XID