Skip to main content

deke_linear/
validator.rs

1use deke_types::{DekeError, DekeResult, SRobotQ, SRobotQLike, Validator};
2
3/// A validator that accepts everything — for callers that handle collision
4/// checking elsewhere (or not at all).
5#[derive(Debug, Clone, Default)]
6pub struct NoopValidator<const N: usize>;
7
8impl<const N: usize> Validator<N, (), f64> for NoopValidator<N> {
9    type Context<'ctx> = ();
10
11    fn validate<'ctx, E: Into<DekeError>, A: SRobotQLike<N, E, f64>>(
12        &self,
13        _q: A,
14        _ctx: &Self::Context<'ctx>,
15    ) -> DekeResult<()> {
16        Ok(())
17    }
18
19    fn validate_motion<'ctx>(
20        &self,
21        _qs: &[SRobotQ<N, f64>],
22        _ctx: &Self::Context<'ctx>,
23    ) -> DekeResult<()> {
24        Ok(())
25    }
26}