pub enum Adapter<Def, Alt>where
Def: DeviceInterface,
Alt: DeviceInterface,{
Default(<Def::Connection as ConnectionInterface>::Adapter),
Alternate(<Alt::Connection as ConnectionInterface>::Adapter),
}
Expand description
Represents a hardware display adapter that can be used for rendering (including the CPU).
Adapters can be sent between threads. To render with an adapter, open a thread-local Device
.
Variants§
Default(<Def::Connection as ConnectionInterface>::Adapter)
The default adapter type.
Alternate(<Alt::Connection as ConnectionInterface>::Adapter)
The alternate adapter type.
Trait Implementations§
source§impl<Def, Alt> Clone for Adapter<Def, Alt>where
Def: DeviceInterface,
Alt: DeviceInterface,
<Def::Connection as ConnectionInterface>::Adapter: Clone,
<Alt::Connection as ConnectionInterface>::Adapter: Clone,
impl<Def, Alt> Clone for Adapter<Def, Alt>where
Def: DeviceInterface,
Alt: DeviceInterface,
<Def::Connection as ConnectionInterface>::Adapter: Clone,
<Alt::Connection as ConnectionInterface>::Adapter: Clone,
Auto Trait Implementations§
impl<Def, Alt> Freeze for Adapter<Def, Alt>where
<<Def as Device>::Connection as Connection>::Adapter: Freeze,
<<Alt as Device>::Connection as Connection>::Adapter: Freeze,
impl<Def, Alt> RefUnwindSafe for Adapter<Def, Alt>where
<<Def as Device>::Connection as Connection>::Adapter: RefUnwindSafe,
<<Alt as Device>::Connection as Connection>::Adapter: RefUnwindSafe,
impl<Def, Alt> Send for Adapter<Def, Alt>where
<<Def as Device>::Connection as Connection>::Adapter: Send,
<<Alt as Device>::Connection as Connection>::Adapter: Send,
impl<Def, Alt> Sync for Adapter<Def, Alt>where
<<Def as Device>::Connection as Connection>::Adapter: Sync,
<<Alt as Device>::Connection as Connection>::Adapter: Sync,
impl<Def, Alt> Unpin for Adapter<Def, Alt>where
<<Def as Device>::Connection as Connection>::Adapter: Unpin,
<<Alt as Device>::Connection as Connection>::Adapter: Unpin,
impl<Def, Alt> UnwindSafe for Adapter<Def, Alt>where
<<Def as Device>::Connection as Connection>::Adapter: UnwindSafe,
<<Alt as Device>::Connection as Connection>::Adapter: UnwindSafe,
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
Mutably borrows from an owned value. Read more