Struct copypasta_ext::osc52::Osc52ClipboardContext
source · pub struct Osc52ClipboardContext;
Expand description
OSC 52 escape sequence to set clipboard contents.
See module documentation for more information.
Implementations§
source§impl Osc52ClipboardContext
impl Osc52ClipboardContext
pub fn new() -> Result<Self, Box<dyn StdError>>
sourcepub fn new_with<G>(
get: G
) -> Result<CombinedClipboardContext<G, Self>, Box<dyn StdError>>where
G: ClipboardProvider,
pub fn new_with<G>( get: G ) -> Result<CombinedClipboardContext<G, Self>, Box<dyn StdError>>where G: ClipboardProvider,
Construct combined with another context for getting the clipboard.
This clipboard context only supports setting the clipboard contents. You can combine this with the given context to support getting clipboard contents as well to get the best of both worlds.
sourcepub fn with<G>(
self,
get: G
) -> Result<CombinedClipboardContext<G, Self>, Box<dyn StdError>>where
G: ClipboardProvider,
pub fn with<G>( self, get: G ) -> Result<CombinedClipboardContext<G, Self>, Box<dyn StdError>>where G: ClipboardProvider,
Combine this context with [X11ClipboardContext
][X11ClipboardContext].
This clipboard context only supports setting the clipboard contents. You can combine this with the given context to support getting clipboard contents as well to get the best of both worlds.
Trait Implementations§
source§impl ClipboardProvider for Osc52ClipboardContext
impl ClipboardProvider for Osc52ClipboardContext
source§fn get_contents(&mut self) -> ClipResult<String>
fn get_contents(&mut self) -> ClipResult<String>
Method to get the clipboard contents as a String
source§fn set_contents(&mut self, contents: String) -> ClipResult<()>
fn set_contents(&mut self, contents: String) -> ClipResult<()>
Method to set the clipboard contents as a String
source§impl ClipboardProviderExt for Osc52ClipboardContext
impl ClipboardProviderExt for Osc52ClipboardContext
source§fn display_server(&self) -> Option<DisplayServer>
fn display_server(&self) -> Option<DisplayServer>
Get related display server.
source§fn has_bin_lifetime(&self) -> bool
fn has_bin_lifetime(&self) -> bool
If this clipboard provider only has a clipboard lifetime of the current binary, rather than
forever.