pub struct SessionState {
pub macros: Vec<MacroDefinition>,
pub packages: Vec<FormatPackage>,
pub resources: Vec<FormatResource>,
pub opaque_engine_state: Vec<u8>,
pub registers: RegisterSnapshot,
}Expand description
Mutable session state cloned from FormatImage.
Fields§
§macros: Vec<MacroDefinition>Macro definitions active in this session.
packages: Vec<FormatPackage>Packages loaded into this session.
resources: Vec<FormatResource>Resources captured for this session.
opaque_engine_state: Vec<u8>Opaque engine state bytes for this session.
registers: RegisterSnapshotRegister values active in this session.
Implementations§
Source§impl SessionState
impl SessionState
Sourcepub fn define_macro(
&mut self,
name: impl Into<String>,
replacement: impl Into<Vec<u8>>,
)
pub fn define_macro( &mut self, name: impl Into<String>, replacement: impl Into<Vec<u8>>, )
Add or replace a macro in the session state.
Sourcepub fn macro_definition(&self, name: &str) -> Option<&MacroDefinition>
pub fn macro_definition(&self, name: &str) -> Option<&MacroDefinition>
Look up a macro definition by control sequence name.
Sourcepub fn package(&self, name: &str) -> Option<&FormatPackage>
pub fn package(&self, name: &str) -> Option<&FormatPackage>
Look up a loaded package by name.
Sourcepub fn resource(&self, name: &str) -> Option<&FormatResource>
pub fn resource(&self, name: &str) -> Option<&FormatResource>
Look up a captured resource by canonical name.
Trait Implementations§
Source§impl Clone for SessionState
impl Clone for SessionState
Source§fn clone(&self) -> SessionState
fn clone(&self) -> SessionState
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 SessionState
impl Debug for SessionState
Source§impl Default for SessionState
impl Default for SessionState
Source§fn default() -> SessionState
fn default() -> SessionState
Returns the “default value” for a type. Read more
impl Eq for SessionState
Source§impl PartialEq for SessionState
impl PartialEq for SessionState
impl StructuralPartialEq for SessionState
Auto Trait Implementations§
impl Freeze for SessionState
impl RefUnwindSafe for SessionState
impl Send for SessionState
impl Sync for SessionState
impl Unpin for SessionState
impl UnsafeUnpin for SessionState
impl UnwindSafe for SessionState
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