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§
Sourcefn ref_data_short(&self) -> [u8; 4]
fn ref_data_short(&self) -> [u8; 4]
The first four bytes of the reference
Sourcefn ref_hex_short(&self) -> String
fn ref_hex_short(&self) -> String
The first four bytes of the reference as a hexadecimal string.
Sourcefn ref_bytewords(&self, prefix: Option<&str>) -> String
fn ref_bytewords(&self, prefix: Option<&str>) -> String
The first four bytes of the reference as upper-case ByteWords.
Sourcefn ref_bytemoji(&self, prefix: Option<&str>) -> String
fn ref_bytemoji(&self, prefix: Option<&str>) -> String
The first four bytes of the reference as Bytemoji.
Implementors§
impl ReferenceProvider for PublicKeyBase
impl ReferenceProvider for Reference
Implement the ReferenceProvider trait for Reference.
Yes, this creates a Reference to a Reference.