Enum copypasta_ext::display::DisplayServer
source · #[non_exhaustive]
pub enum DisplayServer {
X11,
Wayland,
MacOs,
Windows,
Tty,
}
Expand description
A display server type.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
X11
The X11 display server.
Wayland
The Wayland display server.
MacOs
The default macOS display server.
Windows
The default Windows display server.
Tty
For TTYs. Not an actual display server, but something with a clipboard context to fall back to.
Implementations§
source§impl DisplayServer
impl DisplayServer
sourcepub fn select() -> DisplayServer
pub fn select() -> DisplayServer
Select current used display server.
This selection is made at runtime. This uses a best effort approach and does not reliably
select the current display server. Selects any recognized display server regardless of
compiler feature flag configuration. Defaults to X11
on Unix if display server could not
be determined.
sourcepub fn try_context(self) -> Option<Box<dyn ClipboardProviderExt>>
pub fn try_context(self) -> Option<Box<dyn ClipboardProviderExt>>
Build clipboard context for display server.
This attempts to build a clipboard context for the selected display server based on what contexts are available.
If no compatible context is available or if no compatible context could be initialized,
None
is returned.
Trait Implementations§
source§impl Clone for DisplayServer
impl Clone for DisplayServer
source§fn clone(&self) -> DisplayServer
fn clone(&self) -> DisplayServer
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for DisplayServer
impl Debug for DisplayServer
source§impl Hash for DisplayServer
impl Hash for DisplayServer
source§impl PartialEq<DisplayServer> for DisplayServer
impl PartialEq<DisplayServer> for DisplayServer
source§fn eq(&self, other: &DisplayServer) -> bool
fn eq(&self, other: &DisplayServer) -> bool
self
and other
values to be equal, and is used
by ==
.