pub struct DenyAll;Expand description
A policy that denies every transition.
Use DenyAll to test that your runtime correctly handles
policy denials. Every transition attempt will produce a
LifecycleError::TransitionDenied.
§Examples
use ready_active_safe::prelude::*;
let policy = DenyAll;
assert!(!policy.is_allowed(&"ready", &"active"));
let err = policy.check(&"ready", &"active").unwrap_err();
assert_eq!(err, "transition denied by policy");Trait Implementations§
impl Copy for DenyAll
impl Eq for DenyAll
impl StructuralPartialEq for DenyAll
Auto Trait Implementations§
impl Freeze for DenyAll
impl RefUnwindSafe for DenyAll
impl Send for DenyAll
impl Sync for DenyAll
impl Unpin for DenyAll
impl UnsafeUnpin for DenyAll
impl UnwindSafe for DenyAll
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more