pub struct AuthRA<RA: ResourceAlgebra> {
pub auth: Option<ExclusiveRA<RA>>,
pub frac: RA,
}Fields§
§auth: Option<ExclusiveRA<RA>>§frac: RATrait Implementations§
Source§impl<RA: ResourceAlgebra> ResourceAlgebra for AuthRA<RA>
impl<RA: ResourceAlgebra> ResourceAlgebra for AuthRA<RA>
Source§open spec fn valid(self) -> bool
open spec fn valid(self) -> bool
{
match self.auth {
None => self.frac.valid(),
Some(ExclusiveRA::Exclusive(a)) => a.valid() && incl(self.frac, a),
Some(ExclusiveRA::Invalid) => false,
}
}Source§open spec fn op(a: Self, b: Self) -> Self
open spec fn op(a: Self, b: Self) -> Self
{
let auth = Option::<ExclusiveRA<RA>>::op(a.auth, b.auth);
let frac = RA::op(a.frac, b.frac);
AuthRA { auth, frac }
}Source§proof fn associative(a: Self, b: Self, c: Self)
proof fn associative(a: Self, b: Self, c: Self)
Source§proof fn commutative(a: Self, b: Self)
proof fn commutative(a: Self, b: Self)
Auto Trait Implementations§
impl<RA> Freeze for AuthRA<RA>where
RA: Freeze,
impl<RA> RefUnwindSafe for AuthRA<RA>where
RA: RefUnwindSafe,
impl<RA> Send for AuthRA<RA>where
RA: Send,
impl<RA> Sync for AuthRA<RA>where
RA: Sync,
impl<RA> Unpin for AuthRA<RA>where
RA: Unpin,
impl<RA> UnsafeUnpin for AuthRA<RA>where
RA: UnsafeUnpin,
impl<RA> UnwindSafe for AuthRA<RA>where
RA: UnwindSafe,
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
Source§impl<T, U> IntoSpecImpl<U> for Twhere
U: From<T>,
impl<T, U> IntoSpecImpl<U> for Twhere
U: From<T>,
Source§impl<T, VERUS_SPEC__A> TryFromSpec<T> for VERUS_SPEC__Awhere
VERUS_SPEC__A: TryFrom<T>,
impl<T, VERUS_SPEC__A> TryFromSpec<T> for VERUS_SPEC__Awhere
VERUS_SPEC__A: TryFrom<T>,
Source§exec fn obeys_try_from_spec() -> bool
exec fn obeys_try_from_spec() -> bool
Source§impl<T, VERUS_SPEC__A> TryIntoSpec<T> for VERUS_SPEC__Awhere
VERUS_SPEC__A: TryInto<T>,
impl<T, VERUS_SPEC__A> TryIntoSpec<T> for VERUS_SPEC__Awhere
VERUS_SPEC__A: TryInto<T>,
Source§exec fn obeys_try_into_spec() -> bool
exec fn obeys_try_into_spec() -> bool
Source§impl<T, U> TryIntoSpecImpl<U> for Twhere
U: TryFrom<T>,
impl<T, U> TryIntoSpecImpl<U> for Twhere
U: TryFrom<T>,
Source§open spec fn obeys_try_into_spec() -> bool
open spec fn obeys_try_into_spec() -> bool
{ <U as TryFromSpec<Self>>::obeys_try_from_spec() }