Skip to main content

SwapchainBase

Struct SwapchainBase 

Source
pub struct SwapchainBase<TImage: ISwapchainImage + ?Sized + 'static> { /* private fields */ }
Expand description

A helper class for composition-backed swapchains, should not be a public API yet.

A concrete swapchain embeds this type and provides the image factory.

Implementations§

Source§

impl<TImage: ISwapchainImage + ?Sized + 'static> SwapchainBase<TImage>

Source

pub fn new() -> Self

Source

pub fn begin_draw_core( &self, factory: &(impl SwapchainImageFactory<TImage> + ?Sized), size: PixelSize, ) -> (Rc<dyn IDisposable>, Rc<TImage>)

Starts drawing to an image of the given size, which is either reused or created by factory. Disposing the returned value presents the image.

Source

pub fn dispose(&self)

Releases every pending image.

Trait Implementations§

Source§

impl<TImage: ISwapchainImage + ?Sized + 'static> Default for SwapchainBase<TImage>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<TImage> !RefUnwindSafe for SwapchainBase<TImage>

§

impl<TImage> !Send for SwapchainBase<TImage>

§

impl<TImage> !Sync for SwapchainBase<TImage>

§

impl<TImage> !UnwindSafe for SwapchainBase<TImage>

§

impl<TImage> Freeze for SwapchainBase<TImage>
where Rc<RefCell<Vec<Rc<TImage>>>>: Freeze, TImage: ?Sized,

§

impl<TImage> Unpin for SwapchainBase<TImage>
where Rc<RefCell<Vec<Rc<TImage>>>>: Unpin, TImage: ?Sized,

§

impl<TImage> UnsafeUnpin for SwapchainBase<TImage>
where Rc<RefCell<Vec<Rc<TImage>>>>: UnsafeUnpin, TImage: ?Sized,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> ClassDefaults for T
where T: ?Sized,

Source§

fn static_constructor()

The static constructor of a type: work done once per thread, after the properties of the type are registered and before its first instance exists (class handlers, affects_render, metadata overrides). Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.