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§
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>>>
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>>>
Object Safety§
This trait is not object safe.