pub trait UnitRA: RA {
// Required methods
fn unit() -> Self;
fn core_is_total(self);
// Provided methods
fn incl_refl() { ... }
fn unit_core() { ... }
fn core_total(self) -> Self { ... }
}Required Methods§
Sourcefn core_is_total(self)
fn core_is_total(self)
⚠
ensures
self.core() == Some(self.core_total())Provided Methods§
Sourcefn core_total(self) -> Self
fn core_total(self) -> Self
(open)
let _ = self.core_is_maximal_idemp(Self::unit()); self.core().unwrap_logic()
ensures
result.op(result) == Some(result)ensures
result.op(self) == Some(self)Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementations on Foreign Types§
Source§impl<T: RA> UnitRA for Option<T>
impl<T: RA> UnitRA for Option<T>
Source§fn unit() -> Self
fn unit() -> Self
(open)
Noneensures
forall<x: Self> #[trigger(x.op(result))] x.op(result) == Some(x)Source§fn core_total(self) -> Self
fn core_total(self) -> Self
(open)
match self { None => None, Some(x) => x.core(), }
ensures
result.op(result) == Some(result)ensures
result.op(self) == Some(self)Source§fn core_is_total(self)
fn core_is_total(self)
⚠
ensures
self.core() == Some(self.core_total())Source§impl<T: UnitRA, U: UnitRA> UnitRA for (T, U)
impl<T: UnitRA, U: UnitRA> UnitRA for (T, U)
Source§fn core_total(self) -> Self
fn core_total(self) -> Self
(open)
(self.0.core_total(), self.1.core_total())ensures
result.op(result) == Some(result)ensures
result.op(self) == Some(self)Source§fn core_is_total(self)
fn core_is_total(self)
⚠
ensures
self.core() == Some(self.core_total())