pub struct ValidatorAnd<A, B>(pub A, pub B);Tuple Fields§
§0: A§1: BImplementations§
Source§impl<A, B> ValidatorAnd<A, B>
impl<A, B> ValidatorAnd<A, B>
Sourcepub fn new<const N: usize, R: ValidatorRet, F: FKScalar>(a: A, b: B) -> Self
pub fn new<const N: usize, R: ValidatorRet, F: FKScalar>(a: A, b: B) -> Self
Construct an AND combinator after a compile-time assertion that
A and B share the Validator<N, R, F> signature passed via
turbofish or inferred at the call site.
Direct tuple-struct construction (ValidatorAnd(a, b)) skips this
check and is what the combine_validators! macro emits — both
forms produce the same value, and the trait impl below only fires
for (N, R, F) triples both members support, so callers that
dispatch through the trait are safe either way.
Trait Implementations§
Source§impl<A: Clone, B: Clone> Clone for ValidatorAnd<A, B>
impl<A: Clone, B: Clone> Clone for ValidatorAnd<A, B>
Source§fn clone(&self) -> ValidatorAnd<A, B>
fn clone(&self) -> ValidatorAnd<A, B>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<const N: usize, F: FKScalar, R: ValidatorRet, A, B> Validator<N, R, F> for ValidatorAnd<A, B>
Blanket impls below cover every (N, R, F) triple that both member
validators implement: a single generic impl over R and F (and N
since validators are const-generic over DOF) means monomorphization
fires the impl for every shared signature without manual enumeration.
impl<const N: usize, F: FKScalar, R: ValidatorRet, A, B> Validator<N, R, F> for ValidatorAnd<A, B>
Blanket impls below cover every (N, R, F) triple that both member
validators implement: a single generic impl over R and F (and N
since validators are const-generic over DOF) means monomorphization
fires the impl for every shared signature without manual enumeration.
type Context<'ctx> = (<A as Validator<N, R, F>>::Context<'ctx>, <B as Validator<N, R, F>>::Context<'ctx>)
fn validate<'ctx, E: Into<DekeError>, Q: SRobotQLike<N, E, F>>( &self, q: Q, ctx: &Self::Context<'ctx>, ) -> DekeResult<R>
fn validate_motion<'ctx>( &self, qs: &[SRobotQ<N, F>], ctx: &Self::Context<'ctx>, ) -> DekeResult<R>
const VALIDATE_MOTION_IS_CONTINUOUS: bool = false
Auto Trait Implementations§
impl<A, B> Freeze for ValidatorAnd<A, B>
impl<A, B> RefUnwindSafe for ValidatorAnd<A, B>where
A: RefUnwindSafe,
B: RefUnwindSafe,
impl<A, B> Send for ValidatorAnd<A, B>
impl<A, B> Sync for ValidatorAnd<A, B>
impl<A, B> Unpin for ValidatorAnd<A, B>
impl<A, B> UnsafeUnpin for ValidatorAnd<A, B>where
A: UnsafeUnpin,
B: UnsafeUnpin,
impl<A, B> UnwindSafe for ValidatorAnd<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