[][src]Struct candelabre_windowing::CandlSurfaceBuilder

pub struct CandlSurfaceBuilder<'a, R, D, M> where
    R: CandlRenderer<R, D, M>,
    D: CandlUpdate<M>, 
{ /* fields omitted */ }

Surface builder

This builder help create a new CandlSurface in a more idiomatic way

Methods

impl<'_, R> CandlSurfaceBuilder<'_, R, CandlNoState, ()> where
    R: CandlRenderer<R, CandlNoState, ()>, 
[src]

pub fn no_state(self) -> Self[src]

specify to not use state for the surface

impl<'a, R, D, M> CandlSurfaceBuilder<'a, R, D, M> where
    R: CandlRenderer<R, D, M>,
    D: CandlUpdate<M>, 
[src]

pub fn new() -> Self[src]

builder constructor

By default, the builder set the window dimension to Classic(800, 400) and with no name

pub fn dim(self, dim: CandlDimension) -> Self[src]

modify the starting dimension

pub fn title(self, title: &'a str) -> Self[src]

set a title ("" by default)

pub fn options(self, options: CandlOptions) -> Self[src]

modify the options

pub fn render(self, render: R) -> Self[src]

set render object

pub fn state(self, init_state: D) -> Self[src]

change the initial state

pub fn video_mode(self, video_mode: VideoMode) -> Self[src]

set the video mode for the window (from the monitor handle)

pub fn build<T>(
    self,
    el: &EventLoopWindowTarget<T>
) -> Result<CandlSurface<R, D, M>, CandlError>
[src]

try to build the surface

Auto Trait Implementations

impl<'a, R, D, M> !RefUnwindSafe for CandlSurfaceBuilder<'a, R, D, M>

impl<'a, R, D, M> Send for CandlSurfaceBuilder<'a, R, D, M> where
    D: Send,
    M: Send,
    R: Send

impl<'a, R, D, M> Sync for CandlSurfaceBuilder<'a, R, D, M> where
    D: Sync,
    M: Sync,
    R: Sync

impl<'a, R, D, M> Unpin for CandlSurfaceBuilder<'a, R, D, M> where
    D: Unpin,
    M: Unpin,
    R: Unpin

impl<'a, R, D, M> !UnwindSafe for CandlSurfaceBuilder<'a, R, D, M>

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, 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.