pub struct HybridProduct<P: PCM, S: Protocol<K, V>, K, V> {
pub pcm: P,
pub protocol: S,
pub _phantom: PhantomData<(K, V)>,
}Expand description
The hybrid product of a PCM and a storage-protocol resource algebra.
Fields§
§pcm: P§protocol: S§_phantom: PhantomData<(K, V)>A Rust compiler restriction.
Implementations§
Trait Implementations§
Source§impl<P, S, K, V> Protocol<K, V> for HybridProduct<P, S, K, V>where
P: PCM,
S: Protocol<K, V>,
impl<P, S, K, V> Protocol<K, V> for HybridProduct<P, S, K, V>where
P: PCM,
S: Protocol<K, V>,
Source§open spec fn op(self, other: Self) -> Self
open spec fn op(self, other: Self) -> Self
{
HybridProduct {
pcm: self.pcm.op(other.pcm),
protocol: self.protocol.op(other.protocol),
_phantom: PhantomData,
}
}Source§open spec fn unit() -> Self
open spec fn unit() -> Self
{
HybridProduct {
pcm: P::unit(),
protocol: S::unit(),
_phantom: PhantomData,
}
}Source§proof fn commutative(a: Self, b: Self)
proof fn commutative(a: Self, b: Self)
Source§proof fn associative(a: Self, b: Self, c: Self)
proof fn associative(a: Self, b: Self, c: Self)
Auto Trait Implementations§
impl<P, S, K, V> Freeze for HybridProduct<P, S, K, V>
impl<P, S, K, V> RefUnwindSafe for HybridProduct<P, S, K, V>
impl<P, S, K, V> Send for HybridProduct<P, S, K, V>
impl<P, S, K, V> Sync for HybridProduct<P, S, K, V>
impl<P, S, K, V> Unpin for HybridProduct<P, S, K, V>
impl<P, S, K, V> UnwindSafe for HybridProduct<P, S, K, V>
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