[−][src]Struct nannou::wgpu::AdapterMap
A map from RequestAdapterOptions
to active adapters.
Each time an adapter is requested via the App
, it keeps track of which adapters are active.
This is done in order to allow re-use of adapters and in turn re-use of logical devices and the
sharing of resources between windows.
At the end of the application loop (after update
and view
have been called), adapters
containing no active device connections are removed from the map.
Implementations
impl AdapterMap
[src]
pub fn get_or_request<'a, 'b>(
&'a self,
options: RequestAdapterOptions<'b>,
backends: BackendBit
) -> Option<Arc<ActiveAdapter>>
[src]
&'a self,
options: RequestAdapterOptions<'b>,
backends: BackendBit
) -> Option<Arc<ActiveAdapter>>
Check for an adaptor with the given options or request one.
First checks to see if an adapter for the given set of options is active. If so, returns a
handle to this adapter. Otherwise, requests a new adapter via Adapter::request
.
Returns None
if there are no available adapters that meet the specified options.
pub fn request<'a, 'b>(
&'a self,
options: RequestAdapterOptions<'b>,
backends: BackendBit
) -> Option<Arc<ActiveAdapter>>
[src]
&'a self,
options: RequestAdapterOptions<'b>,
backends: BackendBit
) -> Option<Arc<ActiveAdapter>>
Request an adaptor with the given options.
This will always request a new adapter and will never attempt to share an existing one. The new adapter will take the place of the old within the map in the case that an existing active adapter exists.
Returns None
if there are no available adapters that meet the specified options.
pub async fn get_or_request_async<'a, 'b>(
&'a self,
options: RequestAdapterOptions<'b>,
backends: BackendBit
) -> Option<Arc<ActiveAdapter>>
[src]
&'a self,
options: RequestAdapterOptions<'b>,
backends: BackendBit
) -> Option<Arc<ActiveAdapter>>
The async implementation of get_or_request
.
pub async fn request_async<'a, 'b>(
&'a self,
options: RequestAdapterOptions<'b>,
backends: BackendBit
) -> Option<Arc<ActiveAdapter>>
[src]
&'a self,
options: RequestAdapterOptions<'b>,
backends: BackendBit
) -> Option<Arc<ActiveAdapter>>
The async implementation of request
.
Trait Implementations
impl Default for AdapterMap
[src]
fn default() -> AdapterMap
[src]
Auto Trait Implementations
impl RefUnwindSafe for AdapterMap
impl Send for AdapterMap
impl Sync for AdapterMap
impl Unpin for AdapterMap
impl UnwindSafe for AdapterMap
Blanket Implementations
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
D: AdaptFrom<S, Swp, Dwp, T>,
Dwp: WhitePoint,
Swp: WhitePoint,
T: Component + Float,
[src]
D: AdaptFrom<S, Swp, Dwp, T>,
Dwp: WhitePoint,
Swp: WhitePoint,
T: Component + Float,
fn adapt_into_using<M>(self, method: M) -> D where
M: TransformMatrix<Swp, Dwp, T>,
[src]
M: TransformMatrix<Swp, Dwp, T>,
fn adapt_into(self) -> D
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> ConvertInto<U> for T where
U: ConvertFrom<T>,
[src]
U: ConvertFrom<T>,
fn convert_into(self) -> U
[src]
fn convert_unclamped_into(self) -> U
[src]
fn try_convert_into(self) -> Result<U, OutOfBounds<U>>
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
T: Parameter<Self>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,