pub struct LockError { /* private fields */ }sealed only.Expand description
Why the pre-key’s pages are not locked in RAM. Returned by Prekey::lock_status.
Not fatal: the sealed types work the same either way. What is lost is the guarantee
that the pre-key never reaches the swap file. On Windows the usual cause is the
process working-set quota, which every VirtualLock in the process shares; on Unix it
is RLIMIT_MEMLOCK.
It is also returned, without asking the operating system, when the page size is larger than the pre-key (64 KiB pages on some Linux builds): the pre-key would then share a page with other memory, and unlocking it on drop would unlock that memory too.
Carries the operating system’s error code or the page size, never an address.
Implementations§
Source§impl LockError
impl LockError
Sourcepub fn raw_os_error(&self) -> Option<i32>
pub fn raw_os_error(&self) -> Option<i32>
The operating system’s error code (GetLastError on Windows, errno on Unix), when
the failure came from a system call.
Sourcepub fn page_too_large(&self) -> Option<usize>
pub fn page_too_large(&self) -> Option<usize>
The page size, when locking was not attempted because a page is larger than the pre-key.
Trait Implementations§
impl Copy for LockError
impl Eq for LockError
Source§impl Error for LockError
impl Error for LockError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()