#[non_exhaustive]pub enum RmuxError {
#[non_exhaustive] Unsupported {
feature: String,
hint: String,
},
#[non_exhaustive] Protocol {
source: RmuxError,
},
#[non_exhaustive] Transport {
operation: String,
source: Error,
},
#[non_exhaustive] Collect {
source: CollectError,
},
#[non_exhaustive] PartialBroadcast {
source: PartialBroadcastFailure,
},
#[non_exhaustive] WaitTimeout {
source: WaitTimeoutError,
},
#[non_exhaustive] PaneNotFound {
session_name: SessionName,
pane_id: PaneId,
},
#[non_exhaustive] ProcessStillRunning {
message: String,
},
#[non_exhaustive] SpawnFailed {
message: String,
},
#[non_exhaustive] InvalidRegex {
pattern: String,
message: String,
},
#[non_exhaustive] OwnedSessionLeaseLost {
message: String,
},
}Expand description
SDK facade error type for daemon-backed operations.
The type is deliberately not Clone: error surfaces that need duplication
should wrap in Arc rather than fan out cheap copies of opaque diagnostics.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
#[non_exhaustive]Unsupported
A capability or operation is not supported by the negotiated daemon. Carries a stable feature identifier and a visible recovery hint so the SDK can map lower-crate typed unsupported errors to a consistent surface.
Fields
This variant is marked as non-exhaustive
#[non_exhaustive]Protocol
A protocol-level daemon response or local protocol validation failure.
Fields
This variant is marked as non-exhaustive
#[non_exhaustive]Transport
A local transport failure while communicating with the daemon.
Fields
This variant is marked as non-exhaustive
#[non_exhaustive]Collect
Multiple SDK diagnostics collected while evaluating one operation.
Fields
This variant is marked as non-exhaustive
source: CollectErrorAggregated diagnostics preserved as the source error.
#[non_exhaustive]PartialBroadcast
A broadcast reached at least one pane and failed for at least one pane.
Fields
This variant is marked as non-exhaustive
source: PartialBroadcastFailurePer-pane successes and failures.
#[non_exhaustive]WaitTimeout
A visible wait timed out and retained the last observed snapshot.
Fields
This variant is marked as non-exhaustive
source: WaitTimeoutErrorTimeout details and last visible snapshot.
#[non_exhaustive]PaneNotFound
A stable pane id no longer resolves in the addressed session.
Fields
This variant is marked as non-exhaustive
session_name: SessionNameSession searched for the pane id.
#[non_exhaustive]ProcessStillRunning
The pane still has a running process and replacement was not requested.
Fields
This variant is marked as non-exhaustive
#[non_exhaustive]SpawnFailed
A daemon-side process spawn failed.
Fields
This variant is marked as non-exhaustive
#[non_exhaustive]InvalidRegex
A caller supplied an invalid regular expression.
Fields
This variant is marked as non-exhaustive
#[non_exhaustive]OwnedSessionLeaseLost
A daemon-side owned-session lease was not found or no longer matches.
Implementations§
Source§impl RmuxError
impl RmuxError
Sourcepub fn unsupported(feature: impl Into<String>, hint: impl Into<String>) -> Self
pub fn unsupported(feature: impl Into<String>, hint: impl Into<String>) -> Self
Creates an unsupported-feature error with a stable identifier and visible recovery hint.
Sourcepub fn protocol(error: RmuxError) -> Self
pub fn protocol(error: RmuxError) -> Self
Creates an SDK protocol error from a lower-crate protocol diagnostic.
Negotiation and capability mismatches are normalized to
RmuxError::Unsupported so callers can use RmuxError::feature and
RmuxError::hint without parsing lower-crate display text.
Sourcepub fn transport(operation: impl Into<String>, source: Error) -> Self
pub fn transport(operation: impl Into<String>, source: Error) -> Self
Creates an SDK transport error for a daemon communication operation.
Sourcepub fn collect(source: CollectError) -> Self
pub fn collect(source: CollectError) -> Self
Creates an SDK aggregate error from collected diagnostics.
Sourcepub fn partial_broadcast(source: PartialBroadcastFailure) -> Self
pub fn partial_broadcast(source: PartialBroadcastFailure) -> Self
Creates a partial-broadcast error with per-pane results.
Sourcepub fn wait_timeout(source: WaitTimeoutError) -> Self
pub fn wait_timeout(source: WaitTimeoutError) -> Self
Creates a visible-wait timeout error.
Sourcepub fn pane_not_found(session_name: SessionName, pane_id: PaneId) -> Self
pub fn pane_not_found(session_name: SessionName, pane_id: PaneId) -> Self
Creates a typed stable-pane-missing error.
Sourcepub fn invalid_regex(
pattern: impl Into<String>,
message: impl Into<String>,
) -> Self
pub fn invalid_regex( pattern: impl Into<String>, message: impl Into<String>, ) -> Self
Creates a typed regex validation error.
Sourcepub fn hint(&self) -> Option<&str>
pub fn hint(&self) -> Option<&str>
Returns the visible recovery hint associated with this error, if one is recorded for the variant.
Aggregate errors return None; inspect the contained diagnostics with
CollectError::errors to read each individual hint.
Trait Implementations§
Source§impl Error for RmuxError
impl Error for RmuxError
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()
Source§impl Extend<RmuxError> for CollectError
impl Extend<RmuxError> for CollectError
Source§fn extend<T: IntoIterator<Item = RmuxError>>(&mut self, iter: T)
fn extend<T: IntoIterator<Item = RmuxError>>(&mut self, iter: T)
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one)Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one)