Trait smithay_clipboard::mime::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.

Implementors§