pub struct And<A, B>(pub A, pub B);Expand description
Logical AND of two policies — both must accept.
§Examples
use paulistrings::truncation::{And, CoefficientThreshold, WeightCutoff};
let policy = And(CoefficientThreshold(1e-6), WeightCutoff(4));Tuple Fields§
§0: AFirst policy. keep_term and finalize_layer both consult this first.
1: BSecond policy.
Trait Implementations§
Source§impl<const W: usize, A, B> TruncationPolicy<W> for And<A, B>where
A: TruncationPolicy<W>,
B: TruncationPolicy<W>,
impl<const W: usize, A, B> TruncationPolicy<W> for And<A, B>where
A: TruncationPolicy<W>,
B: TruncationPolicy<W>,
Auto Trait Implementations§
impl<A, B> Freeze for And<A, B>
impl<A, B> RefUnwindSafe for And<A, B>where
A: RefUnwindSafe,
B: RefUnwindSafe,
impl<A, B> Send for And<A, B>
impl<A, B> Sync for And<A, B>
impl<A, B> Unpin for And<A, B>
impl<A, B> UnwindSafe for And<A, B>where
A: UnwindSafe,
B: 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> 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 more