pub struct Privkey(/* private fields */);
Expand description
WireGuard private key.
Implementations§
Source§impl Privkey
impl Privkey
Sourcepub fn from_base64(data: &str) -> Result<Self, ParseError>
pub fn from_base64(data: &str) -> Result<Self, ParseError>
Parse key from base64.
Sourcepub fn from_base64_urlsafe(data: &str) -> Result<Self, ParseError>
pub fn from_base64_urlsafe(data: &str) -> Result<Self, ParseError>
Parse key from base64 with urlsafe encoding.
Sourcepub fn to_base64_urlsafe(&self) -> String
pub fn to_base64_urlsafe(&self) -> String
Encode key as base64 with urlsafe encoding.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Privkey
impl<'de> Deserialize<'de> for Privkey
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 Ord for Privkey
impl Ord for Privkey
Source§impl PartialOrd for Privkey
impl PartialOrd for Privkey
impl Copy for Privkey
impl Eq for Privkey
impl StructuralPartialEq for Privkey
Auto Trait Implementations§
impl Freeze for Privkey
impl RefUnwindSafe for Privkey
impl Send for Privkey
impl Sync for Privkey
impl Unpin for Privkey
impl UnwindSafe for Privkey
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