Trait copypasta::Load [] [src]

pub trait Load: Sized {
    type Err: Error + Send + Sync + 'static;
    fn new() -> Result<Self, Self::Err>;
fn load_primary(&self) -> Result<String, Self::Err>; fn load_selection(&self) -> Result<String, Self::Err> { ... }
fn load(&self, buffer: Buffer) -> Result<String, Self::Err> { ... } }

Types that can get the system clipboard contents

Associated Types

Errors encountered when working with a clipboard. Each implementation is allowed to define its own error type, but it must conform to std error.

Required Methods

Create a clipboard

Get the primary clipboard contents.

Provided Methods

Get the clipboard selection contents.

On most platforms, this doesn't mean anything. A default implementation is provided which uses the primary clipboard.

Implementors