[−][src]Struct smithay_client_toolkit::utils::DoubleMemPool
A Double memory pool, for convenient double-buffering
This type wraps two internal memory pool, and can be use for conveniently implementing double-buffering in your apps.
DoubleMemPool requires a implementation that is called when
one of the two internal memory pools becomes free after None
was returned from the pool()
method.
Methods
impl DoubleMemPool
[src]
pub fn new<Impl>(
shm: &Proxy<WlShm>,
implementation: Impl
) -> Result<DoubleMemPool> where
Impl: FnMut() + Send + 'static,
[src]
shm: &Proxy<WlShm>,
implementation: Impl
) -> Result<DoubleMemPool> where
Impl: FnMut() + Send + 'static,
Create a double memory pool
pub fn pool(&mut self) -> Option<&mut MemPool>
[src]
This method checks both its internal memory pools and returns one if that pool does not contain any buffers that are still in use by the server. If both the memory pools contain buffers that are currently in use by the server None will be returned.
Auto Trait Implementations
impl Unpin for DoubleMemPool
impl Sync for DoubleMemPool
impl Send for DoubleMemPool
impl !UnwindSafe for DoubleMemPool
impl !RefUnwindSafe for DoubleMemPool
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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,