clipboard_wayland

Trait AsMimeTypes

Source
pub trait AsMimeTypes {
    // Required methods
    fn available(&self) -> Cow<'static, [MimeType]>;
    fn as_bytes(&self, mime_type: &MimeType) -> Option<Cow<'static, [u8]>>;
}
Expand description

Can be converted to data with the available mime types.

Required Methods§

Source

fn available(&self) -> Cow<'static, [MimeType]>

List available mime types for this data to convert to a byte slice.

Source

fn as_bytes(&self, mime_type: &MimeType) -> Option<Cow<'static, [u8]>>

Converts a type to a byte slice for the given mime type if possible.

Implementations on Foreign Types§

Source§

impl<T> AsMimeTypes for DataWrapper<T>
where T: AsMimeTypes,

Source§

fn available(&self) -> Cow<'static, [MimeType]>

Source§

fn as_bytes(&self, mime_type: &MimeType) -> Option<Cow<'static, [u8]>>

Source§

impl<T> AsMimeTypes for ClipboardStoreData<T>
where T: AsMimeTypes,

Source§

fn available(&self) -> Cow<'static, [MimeType]>

Source§

fn as_bytes(&self, mime_type: &MimeType) -> Option<Cow<'static, [u8]>>

Implementors§