pub enum ActivationError {
NotFound(WorkstreamId),
ActiveConflict(WorkstreamId),
Store(StoreError),
}Expand description
Typed failure surface for activate/deactivate.
Why: callers (the workstream.activate/workstream.deactivate RPC
handlers, crate::workstreams::protocol) need to pattern-match the
distinct failure modes onto their own JSON-RPC error codes rather than
string-sniffing.
What: Self::NotFound — the target id names no existing workstream
(maps to -32002 not_found); Self::ActiveConflict — DOC-48 §6.1’s
exclusivity gate (maps to -32008 active_conflict, carrying the
currently-active id); Self::Store — a lower-level I/O/serialization
failure (maps to -32603 internal_error).
Test: activation_tests::activate_unknown_id_returns_not_found,
activation_tests::activate_without_force_returns_active_conflict.
Variants§
Trait Implementations§
Source§impl Debug for ActivationError
impl Debug for ActivationError
Source§impl Display for ActivationError
impl Display for ActivationError
Source§impl Error for ActivationError
impl Error for ActivationError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<StoreError> for ActivationError
impl From<StoreError> for ActivationError
Source§fn from(source: StoreError) -> Self
fn from(source: StoreError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for ActivationError
impl !UnwindSafe for ActivationError
impl Freeze for ActivationError
impl Send for ActivationError
impl Sync for ActivationError
impl Unpin for ActivationError
impl UnsafeUnpin for ActivationError
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
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
Fallible version of
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a
CompactString. Read more