pub enum Value<T: Zeroize> {
Unprotected(T),
Protected(SecretBox<T>),
}Expand description
Value in an Entry’s fields or an Attachment’s data
Can be either unprotected or protected
Variants§
Implementations§
Source§impl<T: Zeroize> Value<T>
impl<T: Zeroize> Value<T>
Sourcepub fn unprotected(data: impl Into<T>) -> Self
pub fn unprotected(data: impl Into<T>) -> Self
Create a new unprotected value
Sourcepub fn is_protected(&self) -> bool
pub fn is_protected(&self) -> bool
Returns true if the value is protected (either PBytes or PString)
Trait Implementations§
impl<T: Zeroize + Eq> Eq for Value<T>
Auto Trait Implementations§
impl<T> Freeze for Value<T>where
T: Freeze,
impl<T> RefUnwindSafe for Value<T>where
T: RefUnwindSafe,
impl<T> Send for Value<T>where
T: Send,
impl<T> Sync for Value<T>where
T: Sync,
impl<T> Unpin for Value<T>where
T: Unpin,
impl<T> UnsafeUnpin for Value<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for Value<T>where
T: UnwindSafe,
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