pub enum SumRA<RA1: ResourceAlgebra, RA2: ResourceAlgebra> {
Left(RA1),
Right(RA2),
Invalid,
}Variants§
Implementations§
Source§impl<RA1: ResourceAlgebra, RA2: ResourceAlgebra> SumRA<RA1, RA2>
impl<RA1: ResourceAlgebra, RA2: ResourceAlgebra> SumRA<RA1, RA2>
pub fn arrow_Left_0(self) -> RA1
pub fn arrow_Right_0(self) -> RA2
Trait Implementations§
Source§impl<RA1: ResourceAlgebra, RA2: ResourceAlgebra> ResourceAlgebra for SumRA<RA1, RA2>
impl<RA1: ResourceAlgebra, RA2: ResourceAlgebra> ResourceAlgebra for SumRA<RA1, RA2>
Source§open spec fn valid(self) -> bool
open spec fn valid(self) -> bool
{
match self {
SumRA::Left(l) => l.valid(),
SumRA::Right(r) => r.valid(),
SumRA::Invalid => false,
}
}Source§open spec fn op(a: Self, b: Self) -> Self
open spec fn op(a: Self, b: Self) -> Self
{
match (a, b) {
(SumRA::Left(la), SumRA::Left(lb)) => SumRA::Left(RA1::op(la, lb)),
(SumRA::Right(ra), SumRA::Right(rb)) => SumRA::Right(RA2::op(ra, rb)),
_ => SumRA::Invalid,
}
}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<RA1, RA2> Freeze for SumRA<RA1, RA2>
impl<RA1, RA2> RefUnwindSafe for SumRA<RA1, RA2>where
RA1: RefUnwindSafe,
RA2: RefUnwindSafe,
impl<RA1, RA2> Send for SumRA<RA1, RA2>
impl<RA1, RA2> Sync for SumRA<RA1, RA2>
impl<RA1, RA2> Unpin for SumRA<RA1, RA2>
impl<RA1, RA2> UnsafeUnpin for SumRA<RA1, RA2>where
RA1: UnsafeUnpin,
RA2: UnsafeUnpin,
impl<RA1, RA2> UnwindSafe for SumRA<RA1, RA2>where
RA1: UnwindSafe,
RA2: 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() }