pub struct SessionGroup { /* private fields */ }Expand description
A group of sessions for parallel operations.
Implementations§
Source§impl SessionGroup
impl SessionGroup
Sourcepub const fn with_timeout(self, timeout: Duration) -> Self
pub const fn with_timeout(self, timeout: Duration) -> Self
Set timeout for group operations.
Sourcepub fn active_count(&self) -> usize
pub fn active_count(&self) -> usize
Get active session count.
Sourcepub fn set_active(&mut self, id: usize, active: bool)
pub fn set_active(&mut self, id: usize, active: bool)
Set session active state.
Sourcepub fn append_output(&mut self, id: usize, output: &str)
pub fn append_output(&mut self, id: usize, output: &str)
Append output for a session.
Sourcepub fn clear_output(&mut self)
pub fn clear_output(&mut self)
Clear output for all sessions.
Sourcepub fn session_ids(&self) -> Vec<usize>
pub fn session_ids(&self) -> Vec<usize>
Get all session IDs.
Sourcepub fn active_ids(&self) -> Vec<usize>
pub fn active_ids(&self) -> Vec<usize>
Get active session IDs.
Trait Implementations§
Source§impl Debug for SessionGroup
impl Debug for SessionGroup
Source§impl Default for SessionGroup
impl Default for SessionGroup
Source§fn default() -> SessionGroup
fn default() -> SessionGroup
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SessionGroup
impl RefUnwindSafe for SessionGroup
impl Send for SessionGroup
impl Sync for SessionGroup
impl Unpin for SessionGroup
impl UnwindSafe for SessionGroup
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