pub struct MailboxIdentifier(/* private fields */);Expand description
Identifier for a mailbox
Represented as a curve point.
Implementations§
Source§impl MailboxIdentifier
impl MailboxIdentifier
Sourcepub fn to_byte_array(self) -> [u8; 33]
pub fn to_byte_array(self) -> [u8; 33]
Convert into underlying byte array.
Sourcepub fn from_byte_array(bytes: [u8; 33]) -> Self
pub fn from_byte_array(bytes: [u8; 33]) -> Self
Convert from byte array.
Sourcepub fn from_slice(slice: &[u8]) -> Result<Self, TryFromSliceError>
pub fn from_slice(slice: &[u8]) -> Result<Self, TryFromSliceError>
Create from byte slice.
Source§impl MailboxIdentifier
impl MailboxIdentifier
Sourcepub fn from_pubkey(pubkey: PublicKey) -> Self
pub fn from_pubkey(pubkey: PublicKey) -> Self
Convert from a public key
Sourcepub fn to_blinded(
&self,
server_pubkey: PublicKey,
vtxo_key: &Keypair,
) -> BlindedMailboxIdentifier
pub fn to_blinded( &self, server_pubkey: PublicKey, vtxo_key: &Keypair, ) -> BlindedMailboxIdentifier
Blind the mailbox id with the server pubkey and the VTXO privkey
Sourcepub fn from_blinded(
blinded: BlindedMailboxIdentifier,
vtxo_pubkey: PublicKey,
server_key: &Keypair,
) -> MailboxIdentifier
pub fn from_blinded( blinded: BlindedMailboxIdentifier, vtxo_pubkey: PublicKey, server_key: &Keypair, ) -> MailboxIdentifier
Unblind a blinded mailbox identifier
Trait Implementations§
Source§impl AsRef<[u8]> for MailboxIdentifier
impl AsRef<[u8]> for MailboxIdentifier
Source§impl Clone for MailboxIdentifier
impl Clone for MailboxIdentifier
Source§fn clone(&self) -> MailboxIdentifier
fn clone(&self) -> MailboxIdentifier
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MailboxIdentifier
impl Debug for MailboxIdentifier
Source§impl<'de> Deserialize<'de> for MailboxIdentifier
impl<'de> Deserialize<'de> for MailboxIdentifier
Source§fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for MailboxIdentifier
impl Display for MailboxIdentifier
Source§impl<'a> DisplayHex for &'a MailboxIdentifier
impl<'a> DisplayHex for &'a MailboxIdentifier
Source§type Display = <&'a [u8; 33] as DisplayHex>::Display
type Display = <&'a [u8; 33] as DisplayHex>::Display
The type providing
fmt::Display implementation. Read moreSource§fn to_lower_hex_string(self) -> String
fn to_lower_hex_string(self) -> String
Create a lower-hex-encoded string. Read more
Source§fn to_upper_hex_string(self) -> String
fn to_upper_hex_string(self) -> String
Create an upper-hex-encoded string. Read more
Source§fn append_hex_to_string(self, case: Case, string: &mut String)
fn append_hex_to_string(self, case: Case, string: &mut String)
Appends hex-encoded content to an existing
String. Read moreSource§fn hex_reserve_suggestion(self) -> usize
fn hex_reserve_suggestion(self) -> usize
Hints how much bytes to reserve when creating a
String. Read moreSource§impl From<MailboxIdentifier> for [u8; 33]
impl From<MailboxIdentifier> for [u8; 33]
Source§fn from(p: MailboxIdentifier) -> Self
fn from(p: MailboxIdentifier) -> Self
Converts to this type from the input type.
Source§impl From<PublicKey> for MailboxIdentifier
impl From<PublicKey> for MailboxIdentifier
Source§impl FromStr for MailboxIdentifier
impl FromStr for MailboxIdentifier
Source§impl Hash for MailboxIdentifier
impl Hash for MailboxIdentifier
Source§impl Ord for MailboxIdentifier
impl Ord for MailboxIdentifier
Source§fn cmp(&self, other: &MailboxIdentifier) -> Ordering
fn cmp(&self, other: &MailboxIdentifier) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for MailboxIdentifier
impl PartialEq for MailboxIdentifier
Source§impl PartialOrd for MailboxIdentifier
impl PartialOrd for MailboxIdentifier
Source§impl ProtocolEncoding for MailboxIdentifier
impl ProtocolEncoding for MailboxIdentifier
Source§fn encode<W: Write + ?Sized>(&self, w: &mut W) -> Result<(), Error>
fn encode<W: Write + ?Sized>(&self, w: &mut W) -> Result<(), Error>
Encode the object into the writer.
Source§fn decode<R: Read + ?Sized>(r: &mut R) -> Result<Self, ProtocolDecodingError>
fn decode<R: Read + ?Sized>(r: &mut R) -> Result<Self, ProtocolDecodingError>
Decode the object from the writer.
Source§fn deserialize(byte_slice: &[u8]) -> Result<Self, ProtocolDecodingError>
fn deserialize(byte_slice: &[u8]) -> Result<Self, ProtocolDecodingError>
Deserialize object from the given byte slice.
Source§fn serialize_hex(&self) -> String
fn serialize_hex(&self) -> String
Serialize the object to a lowercase hex string.
Source§fn deserialize_hex(hex_str: &str) -> Result<Self, ProtocolDecodingError>
fn deserialize_hex(hex_str: &str) -> Result<Self, ProtocolDecodingError>
Deserialize object from hex slice.
Source§impl Serialize for MailboxIdentifier
impl Serialize for MailboxIdentifier
Source§impl TryFrom<&[u8]> for MailboxIdentifier
impl TryFrom<&[u8]> for MailboxIdentifier
impl Copy for MailboxIdentifier
impl Eq for MailboxIdentifier
impl StructuralPartialEq for MailboxIdentifier
Auto Trait Implementations§
impl Freeze for MailboxIdentifier
impl RefUnwindSafe for MailboxIdentifier
impl Send for MailboxIdentifier
impl Sync for MailboxIdentifier
impl Unpin for MailboxIdentifier
impl UnwindSafe for MailboxIdentifier
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more