pub struct StateStack { /* private fields */ }Expand description
The q/Q stack.
Unbounded, matching PDFium — a content stream may nest as deeply as it likes, and the memory cost is bounded by the stream’s own length.
Implementations§
Source§impl StateStack
impl StateStack
Sourcepub fn push(&mut self, state: &GraphicsState)
pub fn push(&mut self, state: &GraphicsState)
q: save a copy of state.
Sourcepub fn pop(&mut self, state: &mut GraphicsState) -> bool
pub fn pop(&mut self, state: &mut GraphicsState) -> bool
Q: restore into state.
Answers whether anything was restored — a question, not a failed mutation. An empty stack is a no-op, which is what keeps an unbalanced stream rendering.
Trait Implementations§
Source§impl Clone for StateStack
impl Clone for StateStack
Source§fn clone(&self) -> StateStack
fn clone(&self) -> StateStack
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 StateStack
impl Debug for StateStack
Source§impl Default for StateStack
impl Default for StateStack
Source§fn default() -> StateStack
fn default() -> StateStack
Returns the “default value” for a type. Read more
Source§impl PartialEq for StateStack
impl PartialEq for StateStack
impl StructuralPartialEq for StateStack
Auto Trait Implementations§
impl !RefUnwindSafe for StateStack
impl !UnwindSafe for StateStack
impl Freeze for StateStack
impl Send for StateStack
impl Sync for StateStack
impl Unpin for StateStack
impl UnsafeUnpin for StateStack
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