pub struct WindowId(/* private fields */);Expand description
Identifier of a window. Unique for each window.
Can be obtained with window.id().
Whenever you receive an event specific to a window, this event contains a WindowId which you
can then compare to the ids of your windows.
Implementations§
Source§impl WindowId
impl WindowId
Sourcepub const fn into_raw(self) -> usize
pub const fn into_raw(self) -> usize
Convert the WindowId into the underlying integer.
This is useful if you need to pass the ID across an FFI boundary, or store it in an atomic.
Sourcepub const fn from_raw(id: usize) -> Self
pub const fn from_raw(id: usize) -> Self
Construct a WindowId from the underlying integer.
This should only be called with integers returned from WindowId::into_raw.
Trait Implementations§
Source§impl Ord for WindowId
impl Ord for WindowId
Source§impl PartialOrd for WindowId
impl PartialOrd for WindowId
impl Copy for WindowId
impl Eq for WindowId
impl StructuralPartialEq for WindowId
Auto Trait Implementations§
impl Freeze for WindowId
impl RefUnwindSafe for WindowId
impl Send for WindowId
impl Sync for WindowId
impl Unpin for WindowId
impl UnwindSafe for WindowId
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