pub struct RenderCache(/* private fields */);Expand description
The RenderCache owns all geometry created during the render process.
Implementations§
Source§impl RenderCache
impl RenderCache
Sourcepub fn get_2d(&self, hash: &RenderHash) -> Option<&Rc<Geometry2D>>
pub fn get_2d(&self, hash: &RenderHash) -> Option<&Rc<Geometry2D>>
Get 2D geometry from the cache.
Sourcepub fn get_3d(&self, hash: &RenderHash) -> Option<&Rc<Geometry3D>>
pub fn get_3d(&self, hash: &RenderHash) -> Option<&Rc<Geometry3D>>
Get 3D geometry from the cache.
Sourcepub fn insert_2d(
&mut self,
hash: RenderHash,
geo2d: Geometry2D,
) -> Rc<Geometry2D>
pub fn insert_2d( &mut self, hash: RenderHash, geo2d: Geometry2D, ) -> Rc<Geometry2D>
Insert 2D geometry into the cache and return inserted geometry.
Sourcepub fn insert_3d(
&mut self,
hash: RenderHash,
geo3d: Geometry3D,
) -> Rc<Geometry3D>
pub fn insert_3d( &mut self, hash: RenderHash, geo3d: Geometry3D, ) -> Rc<Geometry3D>
Insert 3D geometry into the cache and return inserted geometry.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RenderCache
impl RefUnwindSafe for RenderCache
impl !Send for RenderCache
impl !Sync for RenderCache
impl Unpin for RenderCache
impl UnwindSafe for RenderCache
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