pub trait RenderFeatureSubmitNodeBlock: Downcast + Send + Sync {
// Required methods
fn render_phase(&self) -> u32;
fn num_submit_nodes(&self) -> usize;
fn get_submit_node(&self, submit_node_id: u32) -> RenderFeatureSubmitNode;
fn feature_index(&self) -> u32;
}
Expand description
A type-erased trait used by the Renderer
, RenderFrameJob
, and RendererThreadPool
to control the workload of the rendering process without identifying specific types
used in each RenderFeature
’s frame packet or workload. See SubmitNodeBlock
for
implementation details.
Required Methods§
fn render_phase(&self) -> u32
fn num_submit_nodes(&self) -> usize
fn get_submit_node(&self, submit_node_id: u32) -> RenderFeatureSubmitNode
fn feature_index(&self) -> u32
Implementations§
source§impl dyn RenderFeatureSubmitNodeBlock
impl dyn RenderFeatureSubmitNodeBlock
sourcepub fn is<__T>(&self) -> boolwhere
__T: RenderFeatureSubmitNodeBlock,
pub fn is<__T>(&self) -> boolwhere
__T: RenderFeatureSubmitNodeBlock,
Returns true if the trait object wraps an object of type __T
.
sourcepub fn downcast<__T>(
self: Box<dyn RenderFeatureSubmitNodeBlock>
) -> Result<Box<__T>, Box<dyn RenderFeatureSubmitNodeBlock>>where
__T: RenderFeatureSubmitNodeBlock,
pub fn downcast<__T>(
self: Box<dyn RenderFeatureSubmitNodeBlock>
) -> Result<Box<__T>, Box<dyn RenderFeatureSubmitNodeBlock>>where
__T: RenderFeatureSubmitNodeBlock,
Returns a boxed object from a boxed trait object if the underlying object is of type
__T
. Returns the original boxed trait if it isn’t.
sourcepub fn downcast_rc<__T>(
self: Rc<dyn RenderFeatureSubmitNodeBlock>
) -> Result<Rc<__T>, Rc<dyn RenderFeatureSubmitNodeBlock>>where
__T: RenderFeatureSubmitNodeBlock,
pub fn downcast_rc<__T>(
self: Rc<dyn RenderFeatureSubmitNodeBlock>
) -> Result<Rc<__T>, Rc<dyn RenderFeatureSubmitNodeBlock>>where
__T: RenderFeatureSubmitNodeBlock,
Returns an Rc
-ed object from an Rc
-ed trait object if the underlying object is of
type __T
. Returns the original Rc
-ed trait if it isn’t.
sourcepub fn downcast_ref<__T>(&self) -> Option<&__T>where
__T: RenderFeatureSubmitNodeBlock,
pub fn downcast_ref<__T>(&self) -> Option<&__T>where
__T: RenderFeatureSubmitNodeBlock,
Returns a reference to the object within the trait object if it is of type __T
, or
None
if it isn’t.
sourcepub fn downcast_mut<__T>(&mut self) -> Option<&mut __T>where
__T: RenderFeatureSubmitNodeBlock,
pub fn downcast_mut<__T>(&mut self) -> Option<&mut __T>where
__T: RenderFeatureSubmitNodeBlock,
Returns a mutable reference to the object within the trait object if it is of type
__T
, or None
if it isn’t.