surfman/multi/mod.rs
1//! An abstraction that allows the choice of backends dynamically.
2//!
3//! This is useful on Unix systems, because it allows for Wayland to be tried first, and, failing
4//! that, to use X11.
5//!
6//! Each type here has two type parameters: a "default" device and an "alternate" device. Opening a
7//! connection will first attempt to open the default connection and, if that fails, attempts to
8//! open the alternate connection. You can also create instances of these types manually (i.e.
9//! wrapping a default or alternate type directly) if you have platform-specific initialization
10//! code.
11//!
12//! You can "daisy chain" these types to switch between more than two backends. For example, you
13//! might use `multi::Device<wayland::Device, multi::Device<x11::Device, osmesa::Device>>` for a
14//! device that can dynamically switch between Wayland, X11, and OSMesa.
15
16pub mod connection;
17pub mod context;
18pub mod device;
19pub mod surface;