pub struct DebugSessionRegistry { /* private fields */ }Expand description
Registry for managing debug sessions.
Implementations§
Source§impl DebugSessionRegistry
impl DebugSessionRegistry
Sourcepub fn with_options(
max_sessions: usize,
event_store_factory: Option<EventStoreFactory>,
completion_listeners: Vec<SessionCompletionListener>,
) -> Self
pub fn with_options( max_sessions: usize, event_store_factory: Option<EventStoreFactory>, completion_listeners: Vec<SessionCompletionListener>, ) -> Self
Creates a registry with custom options.
Sourcepub fn register(
&mut self,
session_id: String,
net: &PetriNet,
) -> Arc<DebugEventStore>
pub fn register( &mut self, session_id: String, net: &PetriNet, ) -> Arc<DebugEventStore>
Registers a new debug session for the given Petri net.
Sourcepub fn remove(&mut self, session_id: &str) -> Option<DebugSession>
pub fn remove(&mut self, session_id: &str) -> Option<DebugSession>
Removes a session from the registry.
Sourcepub fn get_session(&self, session_id: &str) -> Option<&DebugSession>
pub fn get_session(&self, session_id: &str) -> Option<&DebugSession>
Returns a reference to a session by ID.
Sourcepub fn list_sessions(&self, limit: usize) -> Vec<&DebugSession>
pub fn list_sessions(&self, limit: usize) -> Vec<&DebugSession>
Lists sessions, ordered by start time (most recent first).
Sourcepub fn list_active_sessions(&self, limit: usize) -> Vec<&DebugSession>
pub fn list_active_sessions(&self, limit: usize) -> Vec<&DebugSession>
Lists only active sessions.
Sourcepub fn register_imported(
&mut self,
session_id: String,
net_name: String,
dot_diagram: String,
structure: NetStructure,
event_store: Arc<DebugEventStore>,
start_time: u64,
)
pub fn register_imported( &mut self, session_id: String, net_name: String, dot_diagram: String, structure: NetStructure, event_store: Arc<DebugEventStore>, start_time: u64, )
Registers an imported (archived) session as inactive.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DebugSessionRegistry
impl !RefUnwindSafe for DebugSessionRegistry
impl Send for DebugSessionRegistry
impl Sync for DebugSessionRegistry
impl Unpin for DebugSessionRegistry
impl UnsafeUnpin for DebugSessionRegistry
impl !UnwindSafe for DebugSessionRegistry
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