ClipboardError
struct · ferroui-base · v0.5.0
struct ClipboardError
The failure of a clipboard operation: what a platform clipboard reports instead of a result.
Members
new
fn new(kind: ClipboardErrorKind, message: impl Into<String>) -> ClipboardError
Creates an error of a kind with a message.
from_kind
fn from_kind(kind: ClipboardErrorKind) -> ClipboardError
Creates an error of a kind with the default message of the kind.
timeout
fn timeout(message: impl Into<String>) -> ClipboardError
The clipboard could not be opened or did not answer in time.
canceled
fn canceled(message: impl Into<String>) -> ClipboardError
The operation was canceled.
access_denied
fn access_denied(message: impl Into<String>) -> ClipboardError
The platform denied access to the clipboard.
platform
fn platform(code: i32, message: impl Into<String>) -> ClipboardError
A call of the platform clipboard interface failed with the result
code code.
other
fn other(message: impl Into<String>) -> ClipboardError
A failure a platform clipboard is not expected to report.
kind
fn kind(self: &Self) -> ClipboardErrorKind
The category of the failure.
message
fn message(self: &Self) -> &str
The message describing the failure.
code
fn code(self: &Self) -> Option<i32>
The result code of the platform call that failed, for
ClipboardErrorKind::Platform errors.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafePropertyValueAnyValueClassDefaultsBorrow<T>BorrowMut<T>CloneToUninitInto<U>From<T>TryInto<U>TryFrom<U>AnyToOwnedToStringErasedDestructorIntoEitherCloneDebugStructuralPartialEqPartialEqEqFrom<ClipboardErrorKind>DisplayError
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.