pub struct MailboxIdentifier(/* private fields */);Expand description
Identifier for a mailbox
Represented as a curve point.
Implementations§
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 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 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for MailboxIdentifier
Source§impl Debug for MailboxIdentifier
impl Debug for MailboxIdentifier
Source§impl Display for MailboxIdentifier
impl Display for MailboxIdentifier
impl Eq for MailboxIdentifier
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 (const: unstable) · 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§fn eq(&self, other: &MailboxIdentifier) -> bool
fn eq(&self, other: &MailboxIdentifier) -> bool
Tests for
self and other values to be equal, and is used by ==.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.
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 UnsafeUnpin 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