1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-31 05:40:03 -04:00

Implement bytemuck behind a feature (#775)

This commit is contained in:
Stock84
2021-10-07 22:30:15 +02:00
committed by GitHub
parent ce8d863249
commit cd2227814f
12 changed files with 42 additions and 0 deletions

View File

@@ -6,8 +6,10 @@ use crate::*;
/// A rectangular region of space.
///
/// Normally given in points, e.g. logical pixels.
#[repr(C)]
#[derive(Clone, Copy, Eq, PartialEq)]
#[cfg_attr(feature = "serde", derive(serde::Deserialize, serde::Serialize))]
#[cfg_attr(feature = "bytemuck", derive(bytemuck::Pod, bytemuck::Zeroable))]
pub struct Rect {
pub min: Pos2,
pub max: Pos2,