[][src]Enum arboard::Error

pub enum Error {
    ContentNotAvailable,
    ClipboardOccupied,
    ConversionFailure,
    Unknown {
        description: String,
    },
}

Variants

ContentNotAvailable

The clipboard contents were not available in the requested format. This could either be due to the clipboard being empty or the clipboard contents having an incompatible format to the requested one (eg when calling get_image on text)

ClipboardOccupied

The native clipboard is not accessible due to being held by an other party.

This "other party" could be a different process or it could be within the same program. So for example you may get this error when trying to interact with the clipboard from multiple threads at once.

Note that it's OK to have multiple Clipboard instances. The underlying implementation will make sure that the native clipboard is only opened for transferring data and then closed as soon as possible.

ConversionFailure

This can happen in either of the following cases. 1, When returned from set_image: the image going to the clipboard cannot be converted to the appropriate format. 2, When returned from get_image: the image coming from the clipboard could not be converted into the ImageData struct. 3, When returned from get_text: the text coming from the clipboard is not valid utf-8 or cannot be converted to utf-8.

Unknown

Fields of Unknown

description: String

Trait Implementations

impl Debug for Error[src]

impl Display for Error[src]

impl Error for Error[src]

Auto Trait Implementations

impl RefUnwindSafe for Error

impl Send for Error

impl Sync for Error

impl Unpin for Error

impl UnwindSafe for Error

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.