Enum wl_clipboard_rs::paste::MimeType
source · pub enum MimeType<'a> {
Any,
Text,
TextWithPriority(&'a str),
Specific(&'a str),
}
Expand description
MIME types that can be requested from the clipboard.
Variants§
Any
Request any available MIME type.
If multiple MIME types are offered, the requested MIME type is unspecified and depends on the order they are received from the Wayland compositor. However, plain text formats are prioritized, so if a plain text format is available among others then it will be requested.
Text
Request a plain text MIME type.
This will request one of the multiple common plain text MIME types. It will prioritize MIME types known to return UTF-8 text.
TextWithPriority(&'a str)
Request the given MIME type, and if it’s not available fall back to MimeType::Text
.
Example use-case: pasting text/html
should try text/html
first, but if it’s not
available, any other plain text format will do fine too.
Specific(&'a str)
Request a specific MIME type.
Trait Implementations§
source§impl<'a> Ord for MimeType<'a>
impl<'a> Ord for MimeType<'a>
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl<'a> PartialEq for MimeType<'a>
impl<'a> PartialEq for MimeType<'a>
source§impl<'a> PartialOrd for MimeType<'a>
impl<'a> PartialOrd for MimeType<'a>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moreimpl<'a> Copy for MimeType<'a>
impl<'a> Eq for MimeType<'a>
impl<'a> StructuralPartialEq for MimeType<'a>
Auto Trait Implementations§
impl<'a> RefUnwindSafe for MimeType<'a>
impl<'a> Send for MimeType<'a>
impl<'a> Sync for MimeType<'a>
impl<'a> Unpin for MimeType<'a>
impl<'a> UnwindSafe for MimeType<'a>
Blanket Implementations§
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
source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.