pub struct Fixed<D = DenyAll, const SIZE: usize = DEFAULT_FIXED_SIZE> { /* private fields */ }
Expand description

An access vector cache of fixed size and memory allocation. The underlying caching strategy is FIFO. Entries are evicted one at a time when entries are added to a full cache.

This implementation is thread-hostile; it expects all operations to be executed on the same thread.

Implementations§

source§

impl<D, const SIZE: usize> Fixed<D, SIZE>

source

pub fn new(delegate: D) -> Self

Constructs a fixed-size access vector cache that delegates to delegate.

§Panics

This will panic when SIZE is 0; i.e., for any Fixed<D, 0>.

TODO: Eliminate dead_code guard.

Trait Implementations§

source§

impl<D, const SIZE: usize> ProxyMut<D> for Fixed<D, SIZE>

source§

fn set_delegate(&mut self, delegate: D) -> D

source§

impl<D: QueryMut, const SIZE: usize> QueryMut for Fixed<D, SIZE>

source§

fn query( &mut self, source_sid: SecurityId, target_sid: SecurityId, target_class: AbstractObjectClass ) -> AccessVector

Computes the [AccessVector] permitted to source_sid for accessing target_sid, an object of type target_class.
source§

impl<D, const SIZE: usize> ResetMut for Fixed<D, SIZE>

source§

fn reset(&mut self) -> bool

Removes all entries from this cache and any reset delegate caches encapsulated in this cache. Returns true only if the cache is still valid after reset.

Auto Trait Implementations§

§

impl<D, const SIZE: usize> Freeze for Fixed<D, SIZE>
where D: Freeze,

§

impl<D, const SIZE: usize> RefUnwindSafe for Fixed<D, SIZE>
where D: RefUnwindSafe,

§

impl<D, const SIZE: usize> Send for Fixed<D, SIZE>
where D: Send,

§

impl<D, const SIZE: usize> Sync for Fixed<D, SIZE>
where D: Sync,

§

impl<D, const SIZE: usize> Unpin for Fixed<D, SIZE>
where D: Unpin,

§

impl<D, const SIZE: usize> UnwindSafe for Fixed<D, SIZE>
where D: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<B, A> LockBefore<B> for A
where B: LockAfter<A>,

source§

impl<B, A> LockEqualOrBefore<B> for A
where A: LockBefore<B>,