pub struct GroupStack { /* private fields */ }Expand description
The compiler’s stack of open clip, layer and snapshot brackets.
Retained across frames alongside the clip stack it mirrors —
reset is what keeps it from carrying state between frames.
Every entry here has a counterpart on the clip stack, and the two are pushed and popped together: a bracket is opened by pushing both, and closed by popping both. That is the invariant that lets an unbalanced pop be ignored safely rather than underflowing either one.
Implementations§
Source§impl GroupStack
impl GroupStack
Sourcepub fn push_layer(&mut self, bounds: Rect, isolated: bool)
pub fn push_layer(&mut self, bounds: Rect, isolated: bool)
Open a layer bracket covering bounds.
isolated says whether the layer was recorded as a layer of its own —
a full-opacity one lowered to its clip alone, and has nothing in the
recording for its pop to close.
Sourcepub fn pop(&mut self) -> Option<Group>
pub fn pop(&mut self) -> Option<Group>
Close the innermost open bracket, or None when none is open.
Trait Implementations§
Source§impl Debug for GroupStack
impl Debug for GroupStack
Auto Trait Implementations§
impl Freeze for GroupStack
impl RefUnwindSafe for GroupStack
impl Send for GroupStack
impl Sync for GroupStack
impl Unpin for GroupStack
impl UnsafeUnpin for GroupStack
impl UnwindSafe for GroupStack
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