pub trait Guardian: Sealed {
type Token;
// Required methods
fn enter() -> GuardianState<Self::Token>;
fn exit(state: GuardianState<Self::Token>);
}Expand description
Determines how interrupts / preemption are handled while a SpinLock is
held.
Required Associated Types§
Required Methods§
Sourcefn enter() -> GuardianState<Self::Token>
fn enter() -> GuardianState<Self::Token>
Enter the protected mode and return the token.
Sourcefn exit(state: GuardianState<Self::Token>)
fn exit(state: GuardianState<Self::Token>)
Exit the protected mode, restoring the previous CPU state.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".