pub enum SetParameterResult {
Success,
ReadOnly,
TypeMismatch,
OutOfRange,
NotFound,
StorageFull,
Undeclared,
InvalidRange,
Rejected,
}the parameter store returns Result<(), ParameterError>; Success is Ok(())
Expand description
Deprecated (phase-515): the store answers Result<(), ParameterError>.
Result of setting a parameter
DEPRECATED (phase-515): the store answers Result<(), ParameterError>,
rclrs’s one spelling – Success is Ok(()) and each other verdict is the
ParameterError variant of the same name. Kept one
release so out-of-tree code naming it keeps compiling.
Variants§
Success
the parameter store returns Result<(), ParameterError>; Success is Ok(())
Parameter was set successfully
ReadOnly
the parameter store returns Result<(), ParameterError>; Success is Ok(())
Parameter is read-only
TypeMismatch
the parameter store returns Result<(), ParameterError>; Success is Ok(())
Parameter type mismatch (and dynamic typing disabled)
OutOfRange
the parameter store returns Result<(), ParameterError>; Success is Ok(())
Value is outside allowed range
NotFound
the parameter store returns Result<(), ParameterError>; Success is Ok(())
Parameter not found
StorageFull
the parameter store returns Result<(), ParameterError>; Success is Ok(())
Storage is full
Undeclared
the parameter store returns Result<(), ParameterError>; Success is Ok(())
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
the parameter store returns Result<(), ParameterError>; Success is Ok(())
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
the parameter store returns Result<(), ParameterError>; Success is Ok(())
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 moreimpl Copy for SetParameterResult
Source§impl Debug for SetParameterResult
impl Debug for SetParameterResult
impl Eq for SetParameterResult
Source§impl From<SetParameterResult> for ParameterError
impl From<SetParameterResult> for ParameterError
Source§fn from(result: SetParameterResult) -> ParameterError
fn from(result: SetParameterResult) -> ParameterError
The retired verdict enum’s error half, kept for one release beside the deprecated type (phase-515).