pub struct SecretBytes { /* private fields */ }Expand description
Arbitrary secret bytes whose backing bytes are overwritten when dropped.
This type intentionally does not implement Clone, Debug, Display, or
serde traits. The standard-library-only overwrite is best-effort: Rust does
not promise that an optimizer, allocator, operating system, crash dump, or
earlier copy cannot retain the bytes.
ⓘ
use rustferry_remote::SecretBytes;
let private_key = SecretBytes::new(b"private-key-value".to_vec());
let _copy = private_key.clone();Implementations§
Trait Implementations§
Source§impl Drop for SecretBytes
impl Drop for SecretBytes
Auto Trait Implementations§
impl Freeze for SecretBytes
impl RefUnwindSafe for SecretBytes
impl Send for SecretBytes
impl Sync for SecretBytes
impl Unpin for SecretBytes
impl UnsafeUnpin for SecretBytes
impl UnwindSafe for SecretBytes
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