Struct webrender::scene_building::NodeIdToIndexMapper
source · pub struct NodeIdToIndexMapper {
spatial_node_map: FastHashMap<SpatialId, SpatialNodeIndex>,
}
Expand description
A data structure that keeps track of mapping between API Ids for spatials and the indices used internally in the SpatialTree to avoid having to do HashMap lookups for primitives and clips during frame building.
Fields§
§spatial_node_map: FastHashMap<SpatialId, SpatialNodeIndex>
Implementations§
source§impl NodeIdToIndexMapper
impl NodeIdToIndexMapper
fn add_spatial_node(&mut self, id: SpatialId, index: SpatialNodeIndex)
fn get_spatial_node_index(&self, id: SpatialId) -> SpatialNodeIndex
Trait Implementations§
source§impl Default for NodeIdToIndexMapper
impl Default for NodeIdToIndexMapper
source§fn default() -> NodeIdToIndexMapper
fn default() -> NodeIdToIndexMapper
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for NodeIdToIndexMapper
impl RefUnwindSafe for NodeIdToIndexMapper
impl Send for NodeIdToIndexMapper
impl Sync for NodeIdToIndexMapper
impl Unpin for NodeIdToIndexMapper
impl UnwindSafe for NodeIdToIndexMapper
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more