Struct surfman_chains::SwapChains[][src]

pub struct SwapChains<SwapChainID: Eq + Hash, Device: DeviceAPI> { /* fields omitted */ }

A thread-safe collection of swap chains.

Implementations

impl<SwapChainID, Device> SwapChains<SwapChainID, Device> where
    SwapChainID: Clone + Eq + Hash + Debug,
    Device: DeviceAPI
[src]

pub fn new() -> SwapChains<SwapChainID, Device>[src]

Create a new collection.

pub fn create_attached_swap_chain(
    &self,
    id: SwapChainID,
    device: &mut Device,
    context: &mut Device::Context,
    surface_access: SurfaceAccess
) -> Result<(), Error>
[src]

Create a new attached swap chain and insert it in the table. Returns an error if the id is already in the table.

pub fn create_detached_swap_chain(
    &self,
    id: SwapChainID,
    size: Size2D<i32>,
    device: &mut Device,
    context: &mut Device::Context,
    surface_access: SurfaceAccess
) -> Result<(), Error>
[src]

Create a new dettached swap chain and insert it in the table. Returns an error if the id is already in the table.

pub fn destroy(
    &self,
    id: SwapChainID,
    device: &mut Device,
    context: &mut Device::Context
) -> Result<(), Error>
[src]

Destroy a swap chain. Called by the producer. Returns an error if context is not the producer context for the swap chain.

pub fn destroy_all(
    &self,
    device: &mut Device,
    context: &mut Device::Context
) -> Result<(), Error>
[src]

Destroy all the swap chains for a particular producer context. Called by the producer.

pub fn iter(
    &self,
    device: &mut Device,
    context: &mut Device::Context
) -> impl Iterator<Item = (SwapChainID, SwapChain<Device>)>
[src]

Iterate over all the swap chains for a particular producer context. Called by the producer.

Trait Implementations

impl<SwapChainID: Eq + Hash, Device: DeviceAPI> Clone for SwapChains<SwapChainID, Device>[src]

impl<SwapChainID: Default + Eq + Hash, Device: Default + DeviceAPI> Default for SwapChains<SwapChainID, Device>[src]

impl<SwapChainID, Device> SwapChainsAPI<SwapChainID> for SwapChains<SwapChainID, Device> where
    SwapChainID: 'static + Clone + Eq + Hash + Debug + Sync + Send,
    Device: 'static + DeviceAPI,
    Device::Surface: Send
[src]

type Surface = Device::Surface

type SwapChain = SwapChain<Device>

fn get(&self, id: SwapChainID) -> Option<SwapChain<Device>>[src]

Get a swap chain

Auto Trait Implementations

impl<SwapChainID, Device> RefUnwindSafe for SwapChains<SwapChainID, Device>

impl<SwapChainID, Device> Send for SwapChains<SwapChainID, Device> where
    SwapChainID: Send + Sync,
    <Device as Device>::Surface: Send

impl<SwapChainID, Device> Sync for SwapChains<SwapChainID, Device> where
    SwapChainID: Send + Sync,
    <Device as Device>::Surface: Send

impl<SwapChainID, Device> Unpin for SwapChains<SwapChainID, Device>

impl<SwapChainID, Device> UnwindSafe for SwapChains<SwapChainID, Device>

Blanket Implementations

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> From<T> for T[src]

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.