Struct grin_wallet_util::OnionV3Address
source · pub struct OnionV3Address(/* private fields */);
Expand description
Struct to hold an onion V3 address, represented internally as a raw ed25519 public key
Implementations§
source§impl OnionV3Address
impl OnionV3Address
sourcepub fn from_bytes(bytes: [u8; 32]) -> Self
pub fn from_bytes(bytes: [u8; 32]) -> Self
from bytes
sourcepub fn from_private(key: &[u8; 32]) -> Result<Self, OnionV3Error>
pub fn from_private(key: &[u8; 32]) -> Result<Self, OnionV3Error>
populate from a private key
sourcepub fn to_ed25519(&self) -> Result<DalekPublicKey, OnionV3Error>
pub fn to_ed25519(&self) -> Result<DalekPublicKey, OnionV3Error>
return dalek public key
sourcepub fn to_ov3_str(&self) -> String
pub fn to_ov3_str(&self) -> String
Return as onion v3 address string
sourcepub fn to_http_str(&self) -> String
pub fn to_http_str(&self) -> String
return as http url
Trait Implementations§
source§impl Clone for OnionV3Address
impl Clone for OnionV3Address
source§fn clone(&self) -> OnionV3Address
fn clone(&self) -> OnionV3Address
Returns a copy 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 OnionV3Address
impl Debug for OnionV3Address
source§impl<'de> Deserialize<'de> for OnionV3Address
impl<'de> Deserialize<'de> for OnionV3Address
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Display for OnionV3Address
impl Display for OnionV3Address
source§impl PartialEq for OnionV3Address
impl PartialEq for OnionV3Address
source§fn eq(&self, other: &OnionV3Address) -> bool
fn eq(&self, other: &OnionV3Address) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for OnionV3Address
impl Serialize for OnionV3Address
source§impl TryFrom<&str> for OnionV3Address
impl TryFrom<&str> for OnionV3Address
impl Eq for OnionV3Address
impl StructuralPartialEq for OnionV3Address
Auto Trait Implementations§
impl Freeze for OnionV3Address
impl RefUnwindSafe for OnionV3Address
impl Send for OnionV3Address
impl Sync for OnionV3Address
impl Unpin for OnionV3Address
impl UnwindSafe for OnionV3Address
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
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.