pub enum RegistryRpcError {
DecodeFailed(String),
UnknownTemplate(String),
DuplicateGroupName(String),
SpawnRejected(String),
SpawnNotSupported,
UnknownGroup(String),
ScaleRejected(String),
ScaleNotSupported,
}Expand description
Handler-level error variants.
§Error shape rationale
Three families of variants:
- Rejection with diagnostic:
*Rejected(String)— the daemon would have accepted the op shape but the runtime state refused it (config validation, replica spawn failure, template-spec mismatch). The string is operator- facing copy. - Op unsupported:
*NotSupported(no payload) — the daemon’s handler doesn’t accept this op at all, typically because the operator didn’t install the corresponding factory closure (SpawnFn/ScaleFn). A read-only daemon surfaces these instead of silently failing. - Resource lookup miss:
UnknownTemplate(String)/UnknownGroup(String)— typed misses for “no such X by that name”. One-string payload (the name the operator supplied) so the CLI can echo it back without re-decoding the request.
§Note on Unregister asymmetry
Unregister deliberately returns
[RegistryResponse::Unregistered { existed: false }] for
“no such group” rather than a typed UnknownGroup error.
Reason: unregister-against-missing is the natural shape of
“make sure this group is gone, idempotently” — operators
scripting cleanup loops should not have to treat the
missing-group case as an error to swallow. Scale and
future write ops that require the group to exist do use
UnknownGroup because they have nothing meaningful to do
against a missing target.
Variants§
DecodeFailed(String)
Request payload failed to decode. Carries the postcard
error message as a String.
UnknownTemplate(String)
Spawn rejected: no template by that name in the
daemon’s config.
DuplicateGroupName(String)
Spawn rejected: a group by group_name is already
registered.
SpawnRejected(String)
Spawn rejected for a daemon-defined reason
(config validation, replica spawn failed, etc.).
Carries an operator-facing diagnostic.
SpawnNotSupported
The daemon refuses dynamic Spawn (no spawn factory
installed via RegistryHandler::with_spawner). Read-only
daemons surface this rather than silently failing.
UnknownGroup(String)
Scale rejected: no group by group_name is registered
on this daemon.
ScaleRejected(String)
Scale rejected for a daemon-defined reason — template
mismatch, replica spawn failure during grow, replica
stop failure during shrink, target count zero, etc.
Carries an operator-facing diagnostic.
ScaleNotSupported
The daemon refuses dynamic Scale (no scale factory
installed). Mirror of Self::SpawnNotSupported for the
scale path.
Trait Implementations§
Source§impl Clone for RegistryRpcError
impl Clone for RegistryRpcError
Source§fn clone(&self) -> RegistryRpcError
fn clone(&self) -> RegistryRpcError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RegistryRpcError
impl Debug for RegistryRpcError
Source§impl<'de> Deserialize<'de> for RegistryRpcError
impl<'de> Deserialize<'de> for RegistryRpcError
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<RegistryRpcError, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<RegistryRpcError, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Eq for RegistryRpcError
Source§impl PartialEq for RegistryRpcError
impl PartialEq for RegistryRpcError
Source§fn eq(&self, other: &RegistryRpcError) -> bool
fn eq(&self, other: &RegistryRpcError) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for RegistryRpcError
impl Serialize for RegistryRpcError
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for RegistryRpcError
Auto Trait Implementations§
impl Freeze for RegistryRpcError
impl RefUnwindSafe for RegistryRpcError
impl Send for RegistryRpcError
impl Sync for RegistryRpcError
impl Unpin for RegistryRpcError
impl UnsafeUnpin for RegistryRpcError
impl UnwindSafe for RegistryRpcError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.