#[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 for DisplayServer
impl PartialEq for DisplayServer
impl Copy for DisplayServer
impl Eq for DisplayServer
impl StructuralPartialEq for DisplayServer
Auto Trait Implementations§
impl Freeze for DisplayServer
impl RefUnwindSafe for DisplayServer
impl Send for DisplayServer
impl Sync for DisplayServer
impl Unpin for DisplayServer
impl UnwindSafe for DisplayServer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more