[][src]Struct surfman_chains::SwapChains

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

A thread-safe collection of swap chains.

Methods

impl<SwapChainID: Clone + Eq + Hash + Debug> SwapChains<SwapChainID>[src]

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

Create a new collection.

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

Get a swap chain

pub fn create_attached_swap_chain(
    &self,
    id: SwapChainID,
    device: &mut Device,
    context: &mut 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 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 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 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 Context
) -> impl Iterator<Item = (SwapChainID, SwapChain)>
[src]

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

Trait Implementations

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

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

Auto Trait Implementations

impl<SwapChainID> Send for SwapChains<SwapChainID> where
    SwapChainID: Send + Sync

impl<SwapChainID> Sync for SwapChains<SwapChainID> where
    SwapChainID: Send + Sync

impl<SwapChainID> Unpin for SwapChains<SwapChainID>

impl<SwapChainID> UnwindSafe for SwapChains<SwapChainID>

impl<SwapChainID> RefUnwindSafe for SwapChains<SwapChainID>

Blanket Implementations

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

impl<T> From<T> for 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.

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

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

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