Enum wl_clipboard_rs::paste::MimeType
source · [−]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
sourceimpl<'a> Ord for MimeType<'a>
impl<'a> Ord for MimeType<'a>
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
sourceimpl<'a> PartialEq<MimeType<'a>> for MimeType<'a>
impl<'a> PartialEq<MimeType<'a>> for MimeType<'a>
sourceimpl<'a> PartialOrd<MimeType<'a>> for MimeType<'a>
impl<'a> PartialOrd<MimeType<'a>> for MimeType<'a>
sourcefn partial_cmp(&self, other: &MimeType<'a>) -> Option<Ordering>
fn partial_cmp(&self, other: &MimeType<'a>) -> Option<Ordering>
1.0.0 · sourcefn 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> StructuralEq 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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
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
. Read morefn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read morefn 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. Read morefn 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. Read moresourceimpl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.