pub struct ClipboardError { /* private fields */ }Expand description
The failure of a clipboard operation: what a platform clipboard reports instead of a result.
Implementations§
Source§impl ClipboardError
impl ClipboardError
Sourcepub fn new(
kind: ClipboardErrorKind,
message: impl Into<String>,
) -> ClipboardError
pub fn new( kind: ClipboardErrorKind, message: impl Into<String>, ) -> ClipboardError
Creates an error of a kind with a message.
Sourcepub fn from_kind(kind: ClipboardErrorKind) -> ClipboardError
pub fn from_kind(kind: ClipboardErrorKind) -> ClipboardError
Creates an error of a kind with the default message of the kind.
Sourcepub fn timeout(message: impl Into<String>) -> ClipboardError
pub fn timeout(message: impl Into<String>) -> ClipboardError
The clipboard could not be opened or did not answer in time.
Sourcepub fn canceled(message: impl Into<String>) -> ClipboardError
pub fn canceled(message: impl Into<String>) -> ClipboardError
The operation was canceled.
Sourcepub fn access_denied(message: impl Into<String>) -> ClipboardError
pub fn access_denied(message: impl Into<String>) -> ClipboardError
The platform denied access to the clipboard.
Sourcepub fn platform(code: i32, message: impl Into<String>) -> ClipboardError
pub fn platform(code: i32, message: impl Into<String>) -> ClipboardError
A call of the platform clipboard interface failed with the result
code code.
Sourcepub fn other(message: impl Into<String>) -> ClipboardError
pub fn other(message: impl Into<String>) -> ClipboardError
A failure a platform clipboard is not expected to report.
Sourcepub fn kind(&self) -> ClipboardErrorKind
pub fn kind(&self) -> ClipboardErrorKind
The category of the failure.
Sourcepub fn code(&self) -> Option<i32>
pub fn code(&self) -> Option<i32>
The result code of the platform call that failed, for
ClipboardErrorKind::Platform errors.
Trait Implementations§
Source§impl Clone for ClipboardError
impl Clone for ClipboardError
Source§impl Debug for ClipboardError
impl Debug for ClipboardError
Source§impl Display for ClipboardError
impl Display for ClipboardError
impl Eq for ClipboardError
Source§impl Error for ClipboardError
impl Error for ClipboardError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
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
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<ClipboardErrorKind> for ClipboardError
impl From<ClipboardErrorKind> for ClipboardError
Source§fn from(kind: ClipboardErrorKind) -> ClipboardError
fn from(kind: ClipboardErrorKind) -> ClipboardError
Converts to this type from the input type.
Source§impl PartialEq for ClipboardError
impl PartialEq for ClipboardError
impl StructuralPartialEq for ClipboardError
Auto Trait Implementations§
impl Freeze for ClipboardError
impl RefUnwindSafe for ClipboardError
impl Send for ClipboardError
impl Sync for ClipboardError
impl Unpin for ClipboardError
impl UnsafeUnpin for ClipboardError
impl UnwindSafe for ClipboardError
Blanket Implementations§
Source§impl<T> AnyValue for Twhere
T: PartialEq + 'static,
impl<T> AnyValue for Twhere
T: PartialEq + 'static,
fn any_value_as_any(&self) -> &(dyn Any + 'static)
fn any_value_eq(&self, other: &(dyn AnyValue + 'static)) -> bool
fn any_value_type_name(&self) -> &'static str
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
The static constructor of a type: work done once per thread, after
the properties of the type are registered and before its first
instance exists (class handlers,
affects_render, metadata
overrides). Read more