#[non_exhaustive]pub struct InvalidConfig {
pub section: Option<&'static str>,
pub field: &'static str,
pub requirement: &'static str,
}Expand description
A controller config value that validate rejected.
Controllers assume a valid config: check it once at construction and on every live change.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.section: Option<&'static str>The loop the field belongs to when a composite config (e.g.
CopterStabilizerConfig)
reported it, e.g. Some("body_rate"); None from a controller config itself.
field: &'static strThe offending field, e.g. "max_integral".
requirement: &'static strWhat the field must satisfy, e.g. "non-negative and finite".
Trait Implementations§
Source§impl Clone for InvalidConfig
impl Clone for InvalidConfig
impl Copy for InvalidConfig
Source§impl Debug for InvalidConfig
impl Debug for InvalidConfig
Source§impl Display for InvalidConfig
impl Display for InvalidConfig
impl Eq for InvalidConfig
Source§impl Error for InvalidConfig
impl Error for InvalidConfig
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 PartialEq for InvalidConfig
impl PartialEq for InvalidConfig
impl StructuralPartialEq for InvalidConfig
Auto Trait Implementations§
impl Freeze for InvalidConfig
impl RefUnwindSafe for InvalidConfig
impl Send for InvalidConfig
impl Sync for InvalidConfig
impl Unpin for InvalidConfig
impl UnsafeUnpin for InvalidConfig
impl UnwindSafe for InvalidConfig
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.