pub struct Display {
pub sizes: Vec<Size>,
pub color: Color,
pub min_text_px: u16,
pub good_text_px: u16,
pub safe_area: Insets,
pub windowed: bool,
}Expand description
A target’s screen.
Fields§
§sizes: Vec<Size>The sizes it shows, in device pixels: one, or one per mode (the Switch handheld and docked). Empty for a window or a browser canvas, which takes any size.
color: ColorHow many colours it shows. ADR-0012 moves this into the target’s capabilities (ticket 3017).
min_text_px: u16Text shorter than this, in device pixels, is an error.
good_text_px: u16Text shorter than this, in device pixels, is a warning.
safe_area: InsetsThe edges a game may not draw what matters under.
windowed: boolWhether the game is in a window the player can switch to full
screen and back (a desktop’s, a browser’s canvas). false for a
device that is always full screen.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Display
impl<'de> Deserialize<'de> for Display
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 Display
impl StructuralPartialEq for Display
Auto Trait Implementations§
impl Freeze for Display
impl RefUnwindSafe for Display
impl Send for Display
impl Sync for Display
impl Unpin for Display
impl UnsafeUnpin for Display
impl UnwindSafe for Display
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