window_clipboard

Trait ClipboardProvider

source
pub trait ClipboardProvider {
    // Required methods
    fn read(&self) -> Result<String, Box<dyn Error>>;
    fn write(&mut self, contents: String) -> Result<(), Box<dyn Error>>;

    // Provided methods
    fn read_primary(&self) -> Option<Result<String, Box<dyn Error>>> { ... }
    fn write_primary(
        &mut self,
        _contents: String,
    ) -> Option<Result<(), Box<dyn Error>>> { ... }
    fn read_data<T>(&self) -> Option<Result<T, Box<dyn Error>>>
       where T: AllowedMimeTypes + 'static { ... }
    fn write_data<T>(
        &mut self,
        _contents: ClipboardStoreData<T>,
    ) -> Option<Result<(), Box<dyn Error>>>
       where T: AsMimeTypes + Send + Sync + 'static { ... }
    fn read_primary_data<T>(&self) -> Option<Result<T, Box<dyn Error>>>
       where T: AllowedMimeTypes + 'static { ... }
    fn read_primary_raw(
        &self,
        _allowed: Vec<String>,
    ) -> Option<Result<(Vec<u8>, String), Box<dyn Error>>> { ... }
    fn read_raw(
        &self,
        _allowed: Vec<String>,
    ) -> Option<Result<(Vec<u8>, String), Box<dyn Error>>> { ... }
    fn write_primary_data<T>(
        &mut self,
        _contents: ClipboardStoreData<T>,
    ) -> Option<Result<(), Box<dyn Error>>>
       where T: AsMimeTypes + Send + Sync + 'static { ... }
}

Required Methods§

source

fn read(&self) -> Result<String, Box<dyn Error>>

source

fn write(&mut self, contents: String) -> Result<(), Box<dyn Error>>

Provided Methods§

source

fn read_primary(&self) -> Option<Result<String, Box<dyn Error>>>

source

fn write_primary( &mut self, _contents: String, ) -> Option<Result<(), Box<dyn Error>>>

source

fn read_data<T>(&self) -> Option<Result<T, Box<dyn Error>>>
where T: AllowedMimeTypes + 'static,

source

fn write_data<T>( &mut self, _contents: ClipboardStoreData<T>, ) -> Option<Result<(), Box<dyn Error>>>
where T: AsMimeTypes + Send + Sync + 'static,

source

fn read_primary_data<T>(&self) -> Option<Result<T, Box<dyn Error>>>
where T: AllowedMimeTypes + 'static,

source

fn read_primary_raw( &self, _allowed: Vec<String>, ) -> Option<Result<(Vec<u8>, String), Box<dyn Error>>>

source

fn read_raw( &self, _allowed: Vec<String>, ) -> Option<Result<(Vec<u8>, String), Box<dyn Error>>>

source

fn write_primary_data<T>( &mut self, _contents: ClipboardStoreData<T>, ) -> Option<Result<(), Box<dyn Error>>>
where T: AsMimeTypes + Send + Sync + 'static,

Object Safety§

This trait is not object safe.

Implementors§