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

Version Path
wasmtime-29.0.0 ./ext/cargo-vendor/wasmtime-29.0.0/src/runtime/vm/mpk/disabled.rs
wasmtime-28.0.0 ./ext/cargo-vendor/wasmtime-28.0.0/src/runtime/vm/mpk/disabled.rs
wasmtime-27.0.0 ./ext/cargo-vendor/wasmtime-27.0.0/src/runtime/vm/mpk/disabled.rs
wasmtime-26.0.0 ./ext/cargo-vendor/wasmtime-26.0.0/src/runtime/vm/mpk/disabled.rs
wasmtime-25.0.2 ./ext/cargo-vendor/wasmtime-25.0.2/src/runtime/vm/mpk/disabled.rs
wasmtime-25.0.1 ./ext/cargo-vendor/wasmtime-25.0.1/src/runtime/vm/mpk/disabled.rs
wasmtime-25.0.0 ./ext/cargo-vendor/wasmtime-25.0.0/src/runtime/vm/mpk/disabled.rs
wasmtime-24.0.0 ./ext/cargo-vendor/wasmtime-24.0.0/src/runtime/vm/mpk/disabled.rs
wasmtime-23.0.2 ./ext/cargo-vendor/wasmtime-23.0.2/src/runtime/vm/mpk/disabled.rs