pub fn from_window(window: Window<'_>, _t: &'sdl SDLToken) -> Result<Self, String> {
    unsafe {
      let window_static: Window<'static> = core::mem::transmute(window);
      let backend = Rc::new(BerylliumBackend::from_window(window_static)?);
      let context = Context::new(backend.clone(), true, DebugCallbackBehavior::default())
        .map_err(|e| e.to_string())?;
      Ok(Self {
        backend,
        context,
        _marker: PhantomData,
      })
    }
  }
/// Given a window, makes a facade.
///
/// Because of shenanigans, you also need to pass a reference to the SDL
/// token.
Given a window, makes a facade.
Because of shenanigans, you also need to pass a reference to the SDL
token.
Given a window makes a facade . Because of shenanigans you also need to pass a reference to the SDL token .
pub fn from_window(window: Window<'_>, _t: &'sdl SDLToken) -> Result<Self, String> {
    unsafe {
      let window_static: Window<'static> = core::mem::transmute(window);
      let backend = Rc::new(BerylliumBackend::from_window(window_static)?);
      let context = Context::new(backend.clone(), true, DebugCallbackBehavior::default())
        .map_err(|e| e.to_string())?;
      Ok(Self {
        backend,
        context,
        _marker: PhantomData,
      })
    }
  }
pub fn from_window ( window : Window < ' _ > , _t : & ' sdl SDLToken ) -> Result < Self , String > { unsafe { let window_static : Window < ' static > = core :: mem :: transmute ( window ) ; let backend = Rc :: new ( BerylliumBackend :: from_window ( window_static ) ? ) ; let context = Context :: new ( backend . clone ( ) , true , DebugCallbackBehavior :: default ( ) ) . map_err ( | e | e . to_string ( ) ) ? ; Ok ( Self { backend , context , _marker : PhantomData , } ) } }
Given a window, makes a facade.
Given a window makes a facade .
window
Window<'_>
_t
&'sdl SDLToken
window
Window<'_>
_t
&'sdl SDLToken