[−][src]Struct surfman_chains::SwapChains
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]
&self,
id: SwapChainID,
device: &mut Device,
context: &mut Context,
surface_access: SurfaceAccess
) -> Result<(), Error>
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]
&self,
id: SwapChainID,
size: Size2D<i32>,
device: &mut Device,
context: &mut Context,
surface_access: SurfaceAccess
) -> Result<(), Error>
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]
&self,
id: SwapChainID,
device: &mut Device,
context: &mut Context
) -> Result<(), Error>
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]
&self,
device: &mut Device,
context: &mut Context
) -> Result<(), Error>
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]
&self,
device: &mut Device,
context: &mut Context
) -> impl Iterator<Item = (SwapChainID, SwapChain)>
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]
fn clone(&self) -> SwapChains<SwapChainID>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<SwapChainID: Default + Eq + Hash> Default for SwapChains<SwapChainID>
[src]
fn default() -> SwapChains<SwapChainID>
[src]
Auto Trait Implementations
impl<SwapChainID> Send for SwapChains<SwapChainID> where
SwapChainID: Send + Sync,
SwapChainID: Send + Sync,
impl<SwapChainID> Sync for SwapChains<SwapChainID> where
SwapChainID: Send + Sync,
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]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
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<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> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,