Skip to main content

CoreEvent

Enum CoreEvent 

Source
pub enum CoreEvent {
Show 24 variants MetricsUpdate(HostId, Metrics), HostStatusChanged(HostId, ConnectionStatus), FileTransferProgress(TransferId, u64, u64), Error(String), HostsLoaded(Vec<Host>), SnippetsLoaded(Vec<Snippet>), SnippetResult { host_name: String, snippet_name: String, output: Result<String, String>, }, FileDirListed { path: String, entries: Vec<FileEntry>, }, LocalDirListed { path: String, entries: Vec<FileEntry>, }, SftpConnected { host_name: String, }, SftpManagerReady { host_name: String, manager: Box<SftpManager>, }, SftpDisconnected { reason: String, }, FilePreviewReady { path: String, content: String, }, SftpOpDone { result: Result<(), String>, }, PtyOutput(SessionId), PtyExited(SessionId), DiscoveryQuickScanDone(HostId, Vec<DetectedService>), DiscoveryFailed(HostId, String), KeySetupProgress(HostId, KeySetupStep), KeySetupComplete(HostId, PathBuf), KeySetupFailed(HostId, String), KeySetupRollback(HostId, String), UpdateAvailable(UpdateInfo), UpdateInstalled(Result<(), String>),
}
Expand description

Domain events produced by the SSH engine, config loaders, and the update checker. Background tasks send these over a dedicated channel; the frontend wraps them into its own event stream.

Variants§

§

MetricsUpdate(HostId, Metrics)

SSH metrics received from a background task.

§

HostStatusChanged(HostId, ConnectionStatus)

Connection status changed for a host (reported by metrics poller).

§

FileTransferProgress(TransferId, u64, u64)

File transfer progress: (transfer_id, bytes_done, bytes_total).

§

Error(String)

An error message surfaced to the user.

§

HostsLoaded(Vec<Host>)

Host list loaded from disk / SSH config in a background task.

§

SnippetsLoaded(Vec<Snippet>)

Snippet list loaded from disk in a background task.

§

SnippetResult

Result of executing a snippet or quick-execute command on one host. output is Ok(stdout) or Err(error_message).

Fields

§host_name: String
§snippet_name: String
§

FileDirListed

Remote directory listing completed.

Fields

§path: String
§entries: Vec<FileEntry>
§

LocalDirListed

Local directory listing completed.

Fields

§path: String
§entries: Vec<FileEntry>
§

SftpConnected

SFTP session successfully established.

Fields

§host_name: String
§

SftpManagerReady

SFTP manager ready with established connection (contains SftpManager handle).

Fields

§host_name: String
§manager: Box<SftpManager>
§

SftpDisconnected

SFTP session closed or failed.

Fields

§reason: String
§

FilePreviewReady

Preview bytes available for a file.

Fields

§path: String
§content: String
§

SftpOpDone

A mutating SFTP operation (delete, mkdir, rename, upload, download) finished.

Fields

§result: Result<(), String>
§

PtyOutput(SessionId)

A PTY session produced output. The bytes are already parsed into the session’s Arc<Mutex<vt100::Parser>>; this event is a lightweight render-nudge so the main loop can update has_activity state without copying bulk output data through the channel.

§

PtyExited(SessionId)

The PTY child process exited (reader thread reached EOF or I/O error).

§

DiscoveryQuickScanDone(HostId, Vec<DetectedService>)

Quick scan completed for a host, services detected.

§

DiscoveryFailed(HostId, String)

Discovery failed for a host with an error message.

§

KeySetupProgress(HostId, KeySetupStep)

Progress update from key setup (host_id, current step, total steps).

§

KeySetupComplete(HostId, PathBuf)

Key setup completed successfully (host_id, private_key_path).

§

KeySetupFailed(HostId, String)

Key setup failed with an error (host_id, error_message).

§

KeySetupRollback(HostId, String)

Emergency rollback was triggered (host_id, rollback_result).

§

UpdateAvailable(UpdateInfo)

A newer release was found on GitHub at startup.

§

UpdateInstalled(Result<(), String>)

A self-update finished — Ok on success, Err with a message on failure.

Trait Implementations§

Source§

impl Debug for CoreEvent

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more