pub enum SetParameterResult {
Success,
ReadOnly,
TypeMismatch,
OutOfRange,
NotFound,
StorageFull,
Undeclared,
InvalidRange,
Rejected,
}Expand description
Result of setting a parameter
Variants§
Success
Parameter was set successfully
ReadOnly
Parameter is read-only
TypeMismatch
Parameter type mismatch (and dynamic typing disabled)
OutOfRange
Value is outside allowed range
NotFound
Parameter not found
StorageFull
Storage is full
Undeclared
A set on a name that was never declared, and the server does not
allow undeclared parameters (issue 1151; rclrs parameter.rs).
Distinct from NotFound: that is what a DIRECT
ParameterServer::set says about a missing name; this is what the
wire-facing ParameterServer::apply
says when the only remaining option — declaring it — is switched off.
InvalidRange
A declaration whose range is ill-formed (min > max or step < 0),
or whose default does not satisfy its own range (issue 1150; rclrs
DeclarationError::InvalidRange / InitialValueOutOfRange).
Rejected
A registered on-set-parameters callback refused the write — rclcpp’s
SetParametersResult { successful: false } from
add_on_set_parameters_callback (phase-417 W4.a).
Distinct from every verdict above it: those are the STORE’s rules, and a caller can predict them from the descriptor. This one is the APPLICATION’s rule, and only the application knows why.
Implementations§
Source§impl SetParameterResult
impl SetParameterResult
Sourcepub fn is_success(&self) -> bool
pub fn is_success(&self) -> bool
Check if the result indicates success
Trait Implementations§
Source§impl Clone for SetParameterResult
impl Clone for SetParameterResult
Source§fn clone(&self) -> SetParameterResult
fn clone(&self) -> SetParameterResult
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more