pub enum DeclarationError {
AlreadyDeclared,
InvalidRange,
InitialValueOutOfRange,
StorageFull,
NameTooLong,
NoValueAvailable,
}Expand description
Why a declaration was refused — phase-417 W4.a.
rclrs separates DECLARE-time failures from set-time ones, and this is that
separation: a write’s Result<(), ParameterError> answers “may this WRITE happen”, this
answers “may this parameter EXIST”. Ours is a subset of rclrs’s, and the
difference is structural rather than an omission: rclrs’s
NoValueAvailable, OverrideValueTypeMismatch and PriorValueTypeMismatch
are about a launch OVERRIDE arriving before the declaration and disagreeing
with it, and nano-ros seeds overrides through the same
ParameterServer::apply path a remote set uses — so a disagreeing
override is a ParameterError, on the write that carried it, and
cannot reach a declaration.
Variants§
AlreadyDeclared
This node already declared this name (rclrs AlreadyDeclared).
InvalidRange
The descriptor’s range is ill-formed — min > max, or a negative step
(rclrs InvalidRange).
InitialValueOutOfRange
The default value is outside the descriptor’s range (rclrs
InitialValueOutOfRange).
StorageFull
Every slot of the caller-owned table is taken. No rclrs correspondent: rclrs’s store grows, ours is the storage the caller placed.
NameTooLong
The name is longer than NROS_MAX_PARAM_NAME_LEN. No rclrs
correspondent, same reason.
NoValueAvailable
A read-only parameter was declared with no default (rclrs
NoValueAvailable; phase-515 R8). A read-only value can never be set
later, so it must arrive with the declaration.
Trait Implementations§
Source§impl Clone for DeclarationError
impl Clone for DeclarationError
Source§fn clone(&self) -> DeclarationError
fn clone(&self) -> DeclarationError
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 DeclarationError
Source§impl Debug for DeclarationError
impl Debug for DeclarationError
impl Eq for DeclarationError
Source§impl From<DeclarationError> for ParameterError
phase-515 R8 – the typed builder’s terminals return DeclarationError
now, as rclrs’s do. This keeps ? into a ParameterError-returning
caller compiling, and maps each case to the ParameterError such a caller
saw before the change.
impl From<DeclarationError> for ParameterError
phase-515 R8 – the typed builder’s terminals return DeclarationError
now, as rclrs’s do. This keeps ? into a ParameterError-returning
caller compiling, and maps each case to the ParameterError such a caller
saw before the change.