Skip to main content

RmuxError

Enum RmuxError 

Source
#[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 enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

#[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 enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
§feature: String

Stable, machine-readable identifier for the unsupported operation. Used by callers that pattern-match on capabilities.

§hint: String

Visible recovery hint shown after the human-readable message.

§

#[non_exhaustive]
Protocol

A protocol-level daemon response or local protocol validation failure.

Fields

This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
§source: RmuxError

Lower-crate protocol diagnostic preserved as the source error.

§

#[non_exhaustive]
Transport

A local transport failure while communicating with the daemon.

Fields

This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
§operation: String

Operation that was attempted when the transport failed.

§source: Error

Underlying I/O failure preserved as the source error.

§

#[non_exhaustive]
Collect

Multiple SDK diagnostics collected while evaluating one operation.

Fields

This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
§source: CollectError

Aggregated 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
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
§source: PartialBroadcastFailure

Per-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
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
§source: WaitTimeoutError

Timeout 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
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
§session_name: SessionName

Session searched for the pane id.

§pane_id: PaneId

Stable pane id requested by the caller.

§

#[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 enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
§message: String

Server diagnostic describing the active process conflict.

§

#[non_exhaustive]
SpawnFailed

A daemon-side process spawn failed.

Fields

This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
§message: String

Server diagnostic describing the spawn failure.

§

#[non_exhaustive]
InvalidRegex

A caller supplied an invalid regular expression.

Fields

This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
§pattern: String

Pattern supplied by the caller.

§message: String

Regex compiler diagnostic.

§

#[non_exhaustive]
OwnedSessionLeaseLost

A daemon-side owned-session lease was not found or no longer matches.

Fields

This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
§message: String

Server diagnostic describing the lost lease.

Implementations§

Source§

impl RmuxError

Source

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.

Source

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.

Source

pub fn transport(operation: impl Into<String>, source: Error) -> Self

Creates an SDK transport error for a daemon communication operation.

Source

pub fn collect(source: CollectError) -> Self

Creates an SDK aggregate error from collected diagnostics.

Source

pub fn partial_broadcast(source: PartialBroadcastFailure) -> Self

Creates a partial-broadcast error with per-pane results.

Source

pub fn wait_timeout(source: WaitTimeoutError) -> Self

Creates a visible-wait timeout error.

Source

pub fn pane_not_found(session_name: SessionName, pane_id: PaneId) -> Self

Creates a typed stable-pane-missing error.

Source

pub fn invalid_regex( pattern: impl Into<String>, message: impl Into<String>, ) -> Self

Creates a typed regex validation error.

Source

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.

Source

pub fn feature(&self) -> Option<&str>

Returns the stable feature identifier when the error variant carries one. The identifier is intended for log keys and capability matching, not user-facing copy.

Trait Implementations§

Source§

impl Debug for RmuxError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for RmuxError

Source§

fn fmt(&self, formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for RmuxError

Source§

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

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl Extend<RmuxError> for CollectError

Source§

fn extend<T: IntoIterator<Item = RmuxError>>(&mut self, iter: T)

Extends a collection with the contents of an iterator. Read more
Source§

fn extend_one(&mut self, item: A)

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
Source§

fn extend_reserve(&mut self, additional: usize)

🔬This is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. Read more
Source§

impl From<CollectError> for RmuxError

Source§

fn from(error: CollectError) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for RmuxError

Source§

fn from(error: Error) -> Self

Converts to this type from the input type.
Source§

impl From<ErrorResponse> for RmuxError

Source§

fn from(response: ErrorResponse) -> Self

Converts to this type from the input type.
Source§

impl From<RmuxError> for RmuxError

Source§

fn from(error: RmuxError) -> Self

Converts to this type from the input type.
Source§

impl FromIterator<RmuxError> for CollectError

Source§

fn from_iter<T: IntoIterator<Item = RmuxError>>(iter: T) -> Self

Creates a value from an iterator. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.