pub struct DrawRunNode {
pub phase: PrimitivePhase,
pub command: Option<DrawCommandId>,
pub recording: Rc<CommandRecording>,
pub segments: Range<u32>,
pub summary: DrawRunSummary,
}Fields§
§phase: PrimitivePhase§command: Option<DrawCommandId>Which draw command recorded these primitives. None only for runs
with no per-command provenance (hand-built tests).
recording: Rc<CommandRecording>Shared, not owned: the recording registry keyed by DrawCommandId
keeps a handle to the same recording, so its buffers survive this
node being dropped on the next rebuild and the command re-records
into them. Nothing mutates a recording after construction, which is
what makes sharing sound.
segments: Range<u32>The segments of the recording this run draws: one placement’s part of a with-content command, or the whole recording.
summary: DrawRunSummaryContent facts consumers keep asking per frame, answered while recording and never by rescanning.
Implementations§
Source§impl DrawRunNode
impl DrawRunNode
pub fn new(phase: PrimitivePhase, primitives: Vec<DrawPrimitive>) -> Self
pub fn for_command( phase: PrimitivePhase, command: Option<DrawCommandId>, primitives: Vec<DrawPrimitive>, ) -> Self
Sourcepub fn primitives(&self) -> impl Iterator<Item = DrawPrimitive> + '_
pub fn primitives(&self) -> impl Iterator<Item = DrawPrimitive> + '_
The run’s primitives, materialised from the recording in order.
Sourcepub fn coverage_rects(&self) -> impl Iterator<Item = Rect> + '_
pub fn coverage_rects(&self) -> impl Iterator<Item = Rect> + '_
The rect every entry of the run can reach.
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
Trait Implementations§
Source§impl Clone for DrawRunNode
impl Clone for DrawRunNode
Source§fn clone(&self) -> DrawRunNode
fn clone(&self) -> DrawRunNode
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DrawRunNode
impl Debug for DrawRunNode
Source§impl PartialEq for DrawRunNode
impl PartialEq for DrawRunNode
impl StructuralPartialEq for DrawRunNode
Auto Trait Implementations§
impl !RefUnwindSafe for DrawRunNode
impl !Send for DrawRunNode
impl !Sync for DrawRunNode
impl !UnwindSafe for DrawRunNode
impl Freeze for DrawRunNode
impl Unpin for DrawRunNode
impl UnsafeUnpin for DrawRunNode
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