pub struct Secret(/* private fields */);
Expand description
WireGuard preshared key.
Implementations§
Source§impl Secret
impl Secret
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 Secret
impl<'de> Deserialize<'de> for Secret
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 Secret
impl Ord for Secret
Source§impl PartialOrd for Secret
impl PartialOrd for Secret
impl Copy for Secret
impl Eq for Secret
impl StructuralPartialEq for Secret
Auto Trait Implementations§
impl Freeze for Secret
impl RefUnwindSafe for Secret
impl Send for Secret
impl Sync for Secret
impl Unpin for Secret
impl UnwindSafe for Secret
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