pub struct Scene {
pub size: RwLock<Point>,
/* private fields */
}
Fields§
§size: RwLock<Point>
Implementations§
source§impl Scene
impl Scene
pub fn new(width: f32, height: f32) -> Self
pub fn set_size(&self, width: f32, height: f32)
pub async fn get_node(&self, id: impl Into<NodeId>) -> Option<Node<SceneNode>>
pub fn get_node_sync(&self, id: impl Into<NodeId>) -> Option<Node<SceneNode>>
pub fn add<R: Into<Layer>>(&self, renderable: R, layout: TaffyNode) -> NodeRef
pub fn append<R: Into<Layer>>( &self, parent: Option<NodeRef>, renderable: R, layout: TaffyNode, ) -> NodeRef
pub async fn with_arena_async<T, F>(&self, f: F) -> Result<T, JoinError>
pub fn with_arena<T: Send + Sync>( &self, f: impl FnOnce(&Arena<SceneNode>) -> T, ) -> T
Auto Trait Implementations§
impl !Freeze for Scene
impl !RefUnwindSafe for Scene
impl Send for Scene
impl Sync for Scene
impl Unpin for Scene
impl !UnwindSafe for Scene
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