mod boxed;
pub mod locked_memory;
pub mod memories;
mod types;
pub mod utils;
pub use thiserror::Error as DeriveError;
pub use types::Bytes;
pub const DEBUG_MSG: &str = "Content of Locked Memory is hidden";
#[derive(Debug, DeriveError)]
pub enum MemoryError {
#[error("Encryption Error")]
EncryptionError,
#[error("Decryption Error")]
DecryptionError,
#[error("Illegal non-contiguous size")]
NCSizeNotAllowed,
#[error("Error while refreshing non-contiguous memory")]
NCRefreshError,
#[error("Lock unavailable")]
LockNotAvailable,
#[error("File System Error")]
FileSystemError,
#[error("Illegal zero-sized value provided")]
ZeroSizedNotAllowed,
#[error("Failed to allocate memory ({0})")]
Allocation(String),
#[error("Intended operation failed: ({0})")]
Operation(String),
#[error("Illegal tentative of using zeroized memory")]
IllegalZeroizedUsage,
}
pub trait ZeroizeOnDrop {}