pub struct DisplayId(pub u32);Expand description
Identifies a display. Stable for the lifetime of a session.
Tuple Fields§
§0: u32Implementations§
Source§impl DisplayId
impl DisplayId
Sourcepub const DEFAULT: Self
pub const DEFAULT: Self
What a client uses when the user did not name a display.
Not part of the wire contract, and the daemon never substitutes it: every
positioned message still carries an explicit display_id, because a mixed-DPI
setup makes an implicit display unrecoverable. This is only what a client fills in
on the way out, so it lives here rather than being spelled 1 in each of them.
The id macOS gives the main display, which is 1 in practice rather than by
guarantee. arin displays lists what a machine actually has.
Trait Implementations§
impl Copy for DisplayId
Source§impl<'de> Deserialize<'de> for DisplayId
impl<'de> Deserialize<'de> for DisplayId
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for DisplayId
Source§impl Ord for DisplayId
impl Ord for DisplayId
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for DisplayId
impl PartialOrd for DisplayId
impl StructuralPartialEq for DisplayId
Auto Trait Implementations§
impl Freeze for DisplayId
impl RefUnwindSafe for DisplayId
impl Send for DisplayId
impl Sync for DisplayId
impl Unpin for DisplayId
impl UnsafeUnpin for DisplayId
impl UnwindSafe for DisplayId
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