pub struct Element(/* private fields */);Expand description
Backend-agnostic element handle. Copy so it threads through
reactive closures without lifetime gymnastics.
Implementations§
Source§impl Element
impl Element
Sourcepub fn id(self) -> u32
pub fn id(self) -> u32
The numeric id this handle wraps. Mostly useful for renderers that store per-element state in side maps.
Sourcepub fn from_raw(id: u32) -> Self
pub fn from_raw(id: u32) -> Self
Construct a handle from a raw id. Use this only when bridging
from a renderer-internal map (e.g. the MockRenderer test
fixture); otherwise let create_element hand them out.
Trait Implementations§
impl Copy for Element
impl Eq for Element
impl StructuralPartialEq for Element
Auto Trait Implementations§
impl Freeze for Element
impl RefUnwindSafe for Element
impl Send for Element
impl Sync for Element
impl Unpin for Element
impl UnsafeUnpin for Element
impl UnwindSafe for Element
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