pub struct TerminalState {
pub id: String,
pub rows: u16,
pub cols: u16,
pub cursor: CursorPosition,
pub mode: TerminalMode,
pub title: String,
pub working_dir: Option<String>,
pub process_info: Option<ProcessInfo>,
pub active: bool,
pub last_activity: DateTime<Utc>,
}Fields§
§id: String§rows: u16§cols: u16§cursor: CursorPosition§mode: TerminalMode§title: String§working_dir: Option<String>§process_info: Option<ProcessInfo>§active: bool§last_activity: DateTime<Utc>Implementations§
Source§impl TerminalState
impl TerminalState
pub fn new(id: String, rows: u16, cols: u16) -> Self
Sourcepub fn set_cursor(&mut self, x: u16, y: u16)
pub fn set_cursor(&mut self, x: u16, y: u16)
Update cursor position
Sourcepub fn move_cursor(&mut self, dx: i16, dy: i16)
pub fn move_cursor(&mut self, dx: i16, dy: i16)
Move cursor relatively
Sourcepub fn set_mode(&mut self, mode: TerminalMode)
pub fn set_mode(&mut self, mode: TerminalMode)
Change terminal mode
Sourcepub fn update_activity(&mut self)
pub fn update_activity(&mut self)
Update last activity timestamp
Sourcepub fn update_process_info(&mut self, info: ProcessInfo)
pub fn update_process_info(&mut self, info: ProcessInfo)
Update process info
Trait Implementations§
Source§impl Clone for TerminalState
impl Clone for TerminalState
Source§fn clone(&self) -> TerminalState
fn clone(&self) -> TerminalState
Returns a duplicate of the value. Read more
1.0.0 · 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 TerminalState
impl Debug for TerminalState
Source§impl<'de> Deserialize<'de> for TerminalState
impl<'de> Deserialize<'de> for TerminalState
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for TerminalState
impl RefUnwindSafe for TerminalState
impl Send for TerminalState
impl Sync for TerminalState
impl Unpin for TerminalState
impl UnwindSafe for TerminalState
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,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.