[][src]Struct nannou::wgpu::AdapterMap

pub struct AdapterMap { /* fields omitted */ }

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]

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]

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]

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]

The async implementation of request.

Trait Implementations

impl Default for AdapterMap[src]

Auto Trait Implementations

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]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T, U> ConvertInto<U> for T where
    U: ConvertFrom<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> SetParameter for T

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,