pub trait BaseGuard {
    type State: Clone + Copy;

    // Required methods
    fn acquire() -> Self::State;
    fn release(state: Self::State);
}
Expand description

A base trait that all guards implement.

Required Associated Types§

source

type State: Clone + Copy

The saved state when entering the critical section.

Required Methods§

source

fn acquire() -> Self::State

Something that must be done before entering the critical section.

source

fn release(state: Self::State)

Something that must be done after leaving the critical section.

Object Safety§

This trait is not object safe.

Implementors§