pub enum DeclarationError {
AlreadyDeclared,
InvalidRange,
InitialValueOutOfRange,
StorageFull,
NameTooLong,
NoValueAvailable,
LaunchValueTypeMismatch,
}Expand description
Why a declaration was refused.
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_PARAMS_MAX_NAME_BYTES. 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.
LaunchValueTypeMismatch
The launch value seeded for this name has another type than the code
declares it with (rclrs OverrideValueTypeMismatch).
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
Source§impl Display for DeclarationError
What each refusal means, for a caller that prints the Err it got back. A
full store names the knob that sizes it (crate::STORE_SIZE_REMEDY).
impl Display for DeclarationError
What each refusal means, for a caller that prints the Err it got back. A
full store names the knob that sizes it (crate::STORE_SIZE_REMEDY).
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.