pub struct AggFuncAlgebra<Commutative = NotProved, Idempotent = NotProved>(/* private fields */);Expand description
Algebraic properties for an aggregation function of type (T, &mut A) -> ().
Commutativity:
ⓘ
let mut state = ???;
f(a, &mut state); f(b, &mut state) // produces same final state as
f(b, &mut state); f(a, &mut state)Idempotence:
ⓘ
let mut state = ???;
f(a, &mut state);
let state1 = *state;
f(a, &mut state);
// state1 must be equal to stateImplementations§
Source§impl<C, I> AggFuncAlgebra<C, I>
impl<C, I> AggFuncAlgebra<C, I>
Sourcepub fn commutative(
self,
_proof: impl CommutativeProof,
) -> AggFuncAlgebra<Proved, I>
pub fn commutative( self, _proof: impl CommutativeProof, ) -> AggFuncAlgebra<Proved, I>
Marks the function as being commutative, with the given proof mechanism.
Sourcepub fn idempotent(
self,
_proof: impl IdempotentProof,
) -> AggFuncAlgebra<C, Proved>
pub fn idempotent( self, _proof: impl IdempotentProof, ) -> AggFuncAlgebra<C, Proved>
Marks the function as being idempotent, with the given proof mechanism.
Trait Implementations§
Source§impl<C, I> Property for AggFuncAlgebra<C, I>
impl<C, I> Property for AggFuncAlgebra<C, I>
Auto Trait Implementations§
impl<Commutative, Idempotent> Freeze for AggFuncAlgebra<Commutative, Idempotent>
impl<Commutative, Idempotent> RefUnwindSafe for AggFuncAlgebra<Commutative, Idempotent>where
Commutative: RefUnwindSafe,
Idempotent: RefUnwindSafe,
impl<Commutative, Idempotent> Send for AggFuncAlgebra<Commutative, Idempotent>
impl<Commutative, Idempotent> Sync for AggFuncAlgebra<Commutative, Idempotent>
impl<Commutative, Idempotent> Unpin for AggFuncAlgebra<Commutative, Idempotent>
impl<Commutative, Idempotent> UnwindSafe for AggFuncAlgebra<Commutative, Idempotent>where
Commutative: UnwindSafe,
Idempotent: 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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.