pub trait LayerManagerAPI<GL: GLTypes> {
// Required methods
fn create_layer(
&mut self,
contexts: &mut dyn GLContexts<GL>,
context_id: ContextId,
init: LayerInit,
) -> Result<LayerId, Error>;
fn destroy_layer(
&mut self,
contexts: &mut dyn GLContexts<GL>,
context_id: ContextId,
layer_id: LayerId,
);
fn layers(&self) -> &[(ContextId, LayerId)];
fn begin_frame(
&mut self,
contexts: &mut dyn GLContexts<GL>,
layers: &[(ContextId, LayerId)],
) -> Result<Vec<SubImages>, Error>;
fn end_frame(
&mut self,
contexts: &mut dyn GLContexts<GL>,
layers: &[(ContextId, LayerId)],
) -> Result<(), Error>;
}Required Methods§
fn create_layer( &mut self, contexts: &mut dyn GLContexts<GL>, context_id: ContextId, init: LayerInit, ) -> Result<LayerId, Error>
fn destroy_layer( &mut self, contexts: &mut dyn GLContexts<GL>, context_id: ContextId, layer_id: LayerId, )
fn layers(&self) -> &[(ContextId, LayerId)]
fn begin_frame( &mut self, contexts: &mut dyn GLContexts<GL>, layers: &[(ContextId, LayerId)], ) -> Result<Vec<SubImages>, Error>
fn end_frame( &mut self, contexts: &mut dyn GLContexts<GL>, layers: &[(ContextId, LayerId)], ) -> Result<(), Error>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".