pub struct DisplayItem {
pub cmd: DrawCmd,
pub z: i32,
pub element_id: u32,
pub series_index: Option<usize>,
pub data_index: Option<usize>,
}Expand description
One entry of the display list.
Fields§
§cmd: DrawCmdThe drawing instruction.
z: i32The paint-order key.
Items are drawn in ascending z; items with the same z are drawn
in the order they were added.
element_id: u32The identity of the element this item belongs to, used to route pointer events.
series_index: Option<usize>The series this item belongs to, if any.
data_index: Option<usize>The data index this item belongs to, if any.
Implementations§
Source§impl DisplayItem
Inherent implementation of DisplayItem.
impl DisplayItem
Inherent implementation of DisplayItem.
Source§impl DisplayItem
impl DisplayItem
pub fn get_cmd(&self) -> &DrawCmd
pub fn get_mut_cmd(&mut self) -> &mut DrawCmd
pub fn set_cmd(&mut self, val: DrawCmd) -> &mut Self
pub fn get_z(&self) -> i32
pub fn get_mut_z(&mut self) -> &mut i32
pub fn set_z(&mut self, val: i32) -> &mut Self
pub fn get_element_id(&self) -> u32
pub fn get_mut_element_id(&mut self) -> &mut u32
pub fn set_element_id(&mut self, val: u32) -> &mut Self
Trait Implementations§
Source§impl Clone for DisplayItem
impl Clone for DisplayItem
Auto Trait Implementations§
impl Freeze for DisplayItem
impl RefUnwindSafe for DisplayItem
impl Send for DisplayItem
impl Sync for DisplayItem
impl Unpin for DisplayItem
impl UnsafeUnpin for DisplayItem
impl UnwindSafe for DisplayItem
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