[−][src]Struct secrecy::SecretBytes
Instance of Bytes
protected by a type that impls the ExposeSecret
trait like Secret<T>
.
Because of the nature of how the Bytes
type works, it needs some special
care in order to have a proper zeroizing drop handler.
Methods
impl SecretBytes
[src]
pub fn new(bytes: impl Into<Bytes>) -> SecretBytes
[src]
Wrap bytes in SecretBytes
Trait Implementations
impl Clone for SecretBytes
[src]
fn clone(&self) -> SecretBytes
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for SecretBytes
[src]
impl<'de> Deserialize<'de> for SecretBytes
[src]
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
[src]
D: Deserializer<'de>,
impl Drop for SecretBytes
[src]
impl ExposeSecret<Bytes> for SecretBytes
[src]
fn expose_secret(&self) -> &Bytes
[src]
impl From<Bytes> for SecretBytes
[src]
fn from(bytes: Bytes) -> SecretBytes
[src]
impl From<BytesMut> for SecretBytes
[src]
fn from(bytes: BytesMut) -> SecretBytes
[src]
Auto Trait Implementations
impl RefUnwindSafe for SecretBytes
impl Send for SecretBytes
impl Sync for SecretBytes
impl Unpin for SecretBytes
impl UnwindSafe for SecretBytes
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,