pub enum SampleRefusal {
NotFinite,
InvalidInterval {
interval: Seconds,
},
InvalidStep {
dt: Seconds,
},
}Expand description
Why StaticWindow::push refused a sample.
The three of InitError’s variants a sample can cause, so a caller handling a refused
sample matches on what a sample can be wrong about and not on an empty window or a bad
seed. It converts into InitError, so ? carries it out of a function that initializes
the filter.
Variants§
NotFinite
The sample carried a value that is not finite: InitError::NotFinite.
InvalidInterval
Its integration interval was under a microsecond: InitError::InvalidInterval.
InvalidStep
It was timed no later than the sample before it: InitError::InvalidStep.
Trait Implementations§
Source§impl Clone for SampleRefusal
impl Clone for SampleRefusal
impl Copy for SampleRefusal
Source§impl Debug for SampleRefusal
impl Debug for SampleRefusal
Source§impl Display for SampleRefusal
impl Display for SampleRefusal
Source§impl Error for SampleRefusal
impl Error for SampleRefusal
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl Format for SampleRefusal
Available on crate feature defmt only.
impl Format for SampleRefusal
Available on crate feature
defmt only.Source§impl From<SampleRefusal> for InitError
impl From<SampleRefusal> for InitError
Source§fn from(refusal: SampleRefusal) -> Self
fn from(refusal: SampleRefusal) -> Self
Converts to this type from the input type.
Source§impl PartialEq for SampleRefusal
impl PartialEq for SampleRefusal
impl StructuralPartialEq for SampleRefusal
Auto Trait Implementations§
impl Freeze for SampleRefusal
impl RefUnwindSafe for SampleRefusal
impl Send for SampleRefusal
impl Sync for SampleRefusal
impl Unpin for SampleRefusal
impl UnsafeUnpin for SampleRefusal
impl UnwindSafe for SampleRefusal
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> Scalar for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.