// ClipboardError — the typed error returned by every clipboard operation.

///|
/// Error type returned by clipboard operations.
pub(all) suberror ClipboardError {
  /// The clipboard has no text content available: it is unowned,
  /// holds only non-text MIME types, or the owner returned empty
  /// output. Real backend failures (X server unreachable, Wayland
  /// compositor missing, etc.) surface as `Backend` instead.
  Empty
  /// The clipboard contains bytes that are not valid UTF-8. Only the
  /// byte length is reported; the raw bytes are intentionally *not*
  /// preserved, so the variant cannot leak clipboard contents
  /// (passwords, tokens, PII, ...) through `Debug` / `ToJson` /
  /// error-report logging. Length alone is enough to distinguish a
  /// short non-UTF-8 string from a large binary blob.
  NotUtf8(Int)
  /// The required CLI tool is not installed (e.g. `xclip`,
  /// `wl-clipboard`, PowerShell). The string carries the missing
  /// command name.
  ToolNotFound(String)
  /// The operation timed out waiting on the underlying subprocess.
  /// The string carries a short context, typically the command name.
  Timeout(String)
  /// The current host OS isn't supported by clipboard-mbt.
  Unsupported(String)
  /// The platform backend reported a generic failure. The string is
  /// human-readable.
  Backend(String)
  /// The operation was cancelled (for example, `Handle::stop` while
  /// watching).
  Cancelled
} derive(Debug, Eq, ToJson)