pub struct StateStack<ET: EngineTypes> {
pub stack: Vec<StackLevel<ET>>,
/* private fields */
}Expand description
A stack of StateChanges, to be rolled back when a group ends
Fields§
§stack: Vec<StackLevel<ET>>The stack of StackLevels
Implementations§
Source§impl<ET: EngineTypes> StateStack<ET>
impl<ET: EngineTypes> StateStack<ET>
Sourcepub fn push(&mut self, group_type: GroupType)
pub fn push(&mut self, group_type: GroupType)
Push a new stack level onto the stack with the given GroupType, as a new group begins
Sourcepub fn pop(&mut self) -> (GroupType, Vec<ET::Token>, ChangeIter<'_, ET>)
pub fn pop(&mut self) -> (GroupType, Vec<ET::Token>, ChangeIter<'_, ET>)
Pop a stack level from the stack, as a group ends. Returns the GroupType, the \aftergroup Tokens,
and an iterator over the StateChanges to be rolled back.
Sourcepub fn add_change_globally(&mut self, change: StateChange<ET>)
pub fn add_change_globally(&mut self, change: StateChange<ET>)
Register a global state change, never to be rolled back; if there is a stack level, remove any equivalent previous changes
Sourcepub fn add_change_locally(&mut self, change: StateChange<ET>)
pub fn add_change_locally(&mut self, change: StateChange<ET>)
Register a local state change, to be rolled back when the current group ends
Trait Implementations§
Source§impl<ET: EngineTypes> Clone for StateStack<ET>
impl<ET: EngineTypes> Clone for StateStack<ET>
Source§impl<ET: EngineTypes> Default for StateStack<ET>
impl<ET: EngineTypes> Default for StateStack<ET>
Auto Trait Implementations§
impl<ET> Freeze for StateStack<ET>
impl<ET> !RefUnwindSafe for StateStack<ET>
impl<ET> Send for StateStack<ET>where
<ET as EngineTypes>::Char: Send,
<ET as EngineTypes>::Int: Send,
<ET as EngineTypes>::Font: Send,
<ET as EngineTypes>::Dim: Send,
<ET as EngineTypes>::CSName: Send,
<ET as EngineTypes>::MuDim: Send,
<<ET as EngineTypes>::File as File>::SourceRefID: Send,
<ET as EngineTypes>::CustomNode: Send,
ET: Send,
impl<ET> !Sync for StateStack<ET>
impl<ET> Unpin for StateStack<ET>where
<ET as EngineTypes>::Token: Unpin,
<ET as EngineTypes>::Char: Unpin,
<ET as EngineTypes>::Int: Unpin,
<ET as EngineTypes>::Font: Unpin,
<ET as EngineTypes>::Dim: Unpin,
<ET as EngineTypes>::CSName: Unpin,
<ET as EngineTypes>::MuDim: Unpin,
<<ET as EngineTypes>::File as File>::SourceRefID: Unpin,
impl<ET> UnsafeUnpin for StateStack<ET>
impl<ET> UnwindSafe for StateStack<ET>where
<ET as EngineTypes>::Token: UnwindSafe,
<ET as EngineTypes>::Char: UnwindSafe,
<ET as EngineTypes>::Int: UnwindSafe,
<ET as EngineTypes>::Font: UnwindSafe,
<ET as EngineTypes>::Dim: UnwindSafe,
<ET as EngineTypes>::CSName: UnwindSafe,
<ET as EngineTypes>::MuDim: UnwindSafe,
<<ET as EngineTypes>::File as File>::SourceRefID: UnwindSafe,
<ET as EngineTypes>::CustomNode: UnwindSafe,
ET: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<ET, Err, A> IntoErr<ET, Err> for Awhere
ET: EngineTypes,
Err: From<A>,
impl<ET, Err, A> IntoErr<ET, Err> for Awhere
ET: EngineTypes,
Err: From<A>,
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().