Sha256: 7f3e3dbeec73be560841b1fbd9698efb6175ced4676ad3dcb954b424248a991e
Contents?: true
Size: 827 Bytes
Versions: 9
Compression:
Stored size: 827 Bytes
Contents
//! Noop implementations of MPK primitives for environments that do not support //! the feature. #![allow(missing_docs)] use crate::prelude::*; pub fn is_supported() -> bool { false } pub fn keys(_: usize) -> &'static [ProtectionKey] { &[] } pub fn allow(_: ProtectionMask) {} pub fn current_mask() -> ProtectionMask { ProtectionMask } #[derive(Clone, Copy, Debug)] pub enum ProtectionKey {} impl ProtectionKey { pub fn protect(&self, _: &mut [u8]) -> Result<()> { match *self {} } pub fn as_stripe(&self) -> usize { match *self {} } } #[derive(Clone, Copy, Debug)] pub struct ProtectionMask; impl ProtectionMask { pub fn all() -> Self { Self } pub fn zero() -> Self { Self } pub fn or(self, _: ProtectionKey) -> Self { Self } }
Version data entries
9 entries across 9 versions & 1 rubygems