pub enum ResumeError {
NotFound(SessionId),
NotPaused {
actual_tag: ExecutionStateTag,
},
AlreadyCancelled,
FeedError(String),
}Expand description
Error returned by crate::execution::ExecutionService::resume.
§Note on #[from] and serde compatibility
FeedError (from crates/algocline-core/src/state.rs) does not derive
serde::Serialize + serde::Deserialize, so we cannot use #[from] FeedError
directly on a serde-enabled enum. Instead, the FeedError variant stores the
display string, and a manual From<FeedError> impl converts it.
Subtask 2 may add From<SessionError> to this enum; if a second #[from]
conversion causes a trait impl conflict (K-79), the later conversion must use
map_err instead.
Variants§
NotFound(SessionId)
No session with the given id exists in the registry.
NotPaused
The session exists but is not in the Paused state.
Fields
actual_tag: ExecutionStateTagThe state the session is actually in.
AlreadyCancelled
The session is already cancelled; resuming is a no-op that returns this error so callers are explicitly informed.
FeedError(String)
The feed operation on the underlying session failed.
The original FeedError message is preserved as a String because FeedError
does not implement serde::Serialize + serde::Deserialize.
Trait Implementations§
Source§impl Debug for ResumeError
impl Debug for ResumeError
Source§impl<'de> Deserialize<'de> for ResumeError
impl<'de> Deserialize<'de> for ResumeError
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Display for ResumeError
impl Display for ResumeError
Source§impl Error for ResumeError
impl Error for ResumeError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()