[][src]Trait candelabre_windowing::CandlElement

pub trait CandlElement<W: CandlWindow> {
    fn build<T>(
        el: &EventLoopWindowTarget<T>,
        video_mode: VideoMode,
        dim: CandlDimension,
        title: &str,
        options: CandlOptions
    ) -> Result<W, CandlError>; }

CandlElement trait

This trait's purpose is to enable using CandlWindow in the manager without too many boilerplate in the surface side. With this code it's easy to just implement both CandlWindow and CandlElement traits on a single type to make it usable with the CandlManager.

Required methods

fn build<T>(
    el: &EventLoopWindowTarget<T>,
    video_mode: VideoMode,
    dim: CandlDimension,
    title: &str,
    options: CandlOptions
) -> Result<W, CandlError>

to use CandlWindow with CandlManager the type implementing this trait must implement the window_builder method

Loading content...

Implementors

impl<'a, R> CandlElement<CandlSurface<R, CandlNoState, ()>> for CandlSurface<R, CandlNoState, ()> where
    R: CandlRenderer<R, CandlNoState, ()>, 
[src]

fn build<T>(
    el: &EventLoopWindowTarget<T>,
    video_mode: VideoMode,
    dim: CandlDimension,
    title: &str,
    options: CandlOptions
) -> Result<CandlSurface<R, CandlNoState, ()>, CandlError>
[src]

build method to make CandlSurface compatible with the CandlManager

WARNING: avoid at all cost the use of this method, prefer the builder instead.

Loading content...