pub struct Destination {
pub data: Vec<u8>,
}Expand description
An I2P destination (public key, typically ~387 bytes raw).
Fields§
§data: Vec<u8>Raw binary destination bytes.
Implementations§
Source§impl Destination
impl Destination
Sourcepub fn to_i2p_base64(&self) -> String
pub fn to_i2p_base64(&self) -> String
Encode destination to I2P base64.
Sourcepub fn from_i2p_base64(s: &str) -> Result<Self, SamError>
pub fn from_i2p_base64(s: &str) -> Result<Self, SamError>
Decode destination from I2P base64.
Sourcepub fn base32_address(&self) -> String
pub fn base32_address(&self) -> String
Compute the .b32.i2p address from this destination. SHA-256 of raw destination bytes, base32-encoded, lowercase + “.b32.i2p”.
Trait Implementations§
Source§impl Clone for Destination
impl Clone for Destination
Source§fn clone(&self) -> Destination
fn clone(&self) -> Destination
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 moreAuto Trait Implementations§
impl Freeze for Destination
impl RefUnwindSafe for Destination
impl Send for Destination
impl Sync for Destination
impl Unpin for Destination
impl UnwindSafe for Destination
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