Skip to main content

Message

Enum Message 

Source
pub enum Message {
Show 41 variants VpsRegistryEmpty, VpsAdded { name: String, }, VpsRemoved { name: String, }, VpsDuplicate { name: String, }, VpsNotFound { name: String, }, VpsActiveSelected { name: String, }, ErrorConfig { detail: String, }, ErrorSshConnection { detail: String, }, ErrorAuthentication { detail: String, }, ErrorCommandFailed { detail: String, }, ErrorHostKeyChanged { detail: String, }, ErrorTimeout { detail: String, }, ErrorFileNotFound { path: String, }, ErrorUnavailable { service: String, }, ErrorSoftware { op: String, }, ErrorPartialFailure { detail: String, }, ErrorInvalidArgument { detail: String, }, ErrorUnexpected { detail: String, }, VpsEdited { name: String, }, ExportCompleted { path: String, }, ImportCompleted, PrimaryKeyReady { source: String, key_file: String, }, ReencryptCompleted { hosts: usize, }, TunnelPressCtrlC, HealthCheckOk { name: String, }, OperationCancelled, ScpUploadCompleted { bytes: u64, ms: u64, }, ScpDownloadCompleted { bytes: u64, ms: u64, }, ScpUploadFileOnly, ScpDownloadLocalNotDirectory, SftpUploadCompleted { bytes: u64, ms: u64, }, SftpDownloadCompleted { bytes: u64, ms: u64, }, SftpFsOpDone { op: String, path: String, ms: u64, }, SftpFsOpDoneTo { op: String, path: String, to: String, ms: u64, }, LocalePreferenceSaved { lang: String, path: String, }, LocalePreferenceCleared, LocaleStatusTitle, TunnelLocalListening { bind: String, port: u16, remote_host: String, remote_port: u16, vps: String, timeout_ms: u64, }, TunnelSocks5Listening { bind: String, port: u16, vps: String, timeout_ms: u64, }, TunnelStreamLocalListening { bind: String, port: u16, socket_path: String, vps: String, timeout_ms: u64, }, TunnelReverseListening { remote_bind: String, remote_port: u16, local_host: String, local_port: u16, vps: String, timeout_ms: u64, },
}
Expand description

All system UI messages.

SINGLE source of user-visible strings. Each variant has an exhaustive translation in en() and pt(). FORBIDDEN to use UI literals outside this enum.

Variants with dynamic fields (e.g. { name: String }) allow including contextual data in the message. Message is not Copy because String fields are not Copy.

Variants§

§

VpsRegistryEmpty

No VPS registered in the configuration file.

§

VpsAdded

VPS successfully added to the registry.

Fields

§name: String

Name of the added VPS.

§

VpsRemoved

VPS successfully removed from the registry.

Fields

§name: String

Name of the removed VPS.

§

VpsDuplicate

Attempt to add a VPS that already exists.

Fields

§name: String

Name of the duplicate VPS.

§

VpsNotFound

Requested VPS was not found in the registry.

Fields

§name: String

Name of the missing VPS.

§

VpsActiveSelected

Active VPS selected for subsequent operations.

Fields

§name: String

Name of the selected VPS.

§

ErrorConfig

Configuration could not be read or written.

Fields

§detail: String

Underlying failure detail (English, from the source error).

§

ErrorSshConnection

Error establishing an SSH connection to the remote server.

Fields

§detail: String

Underlying failure detail.

§

ErrorAuthentication

SSH authentication was rejected by the server.

Fields

§detail: String

Underlying failure detail.

§

ErrorCommandFailed

Remote SSH command execution failed.

Fields

§detail: String

Underlying failure detail.

§

ErrorHostKeyChanged

Remote host key no longer matches the pinned entry.

Fields

§detail: String

Underlying failure detail.

§

ErrorTimeout

Operation exceeded its deadline.

Fields

§detail: String

Underlying failure detail.

§

ErrorFileNotFound

Requested file was not found.

Fields

§path: String

Path that was not found.

§

ErrorUnavailable

A required external service is unavailable.

Fields

§service: String

Service name (for example keyring).

§

ErrorSoftware

The program itself failed in a way retrying cannot fix.

Fields

§op: String

Failing operation name (for example rng).

§

ErrorPartialFailure

A multi-host fan-out succeeded only in part.

Fields

§detail: String

Underlying failure detail.

§

ErrorInvalidArgument

Invalid argument supplied to the operation.

Fields

§detail: String

Detail of the invalid argument.

§

ErrorUnexpected

A failure that carries no product error type.

Reached from the last branch of resolve_exit_code, where an anyhow chain held neither SshCliError nor DomainError. That branch printed the raw English chain regardless of --lang, so the one error a user is least equipped to interpret was also the only one never translated.

Fields

§detail: String

Underlying failure detail (English, from the anyhow chain).

§

VpsEdited

VPS record edited successfully.

Fields

§name: String

VPS name.

§

ExportCompleted

Export completed.

Fields

§path: String

Destination path.

§

ImportCompleted

Import completed.

§

PrimaryKeyReady

Primary key ready.

Fields

§source: String

Key source identifier.

§key_file: String

Key file path.

§

ReencryptCompleted

Re-encrypt completed.

Fields

§hosts: usize

Host count.

§

TunnelPressCtrlC

Instruction to stop the tunnel via Ctrl+C.

§

HealthCheckOk

Successful VPS connectivity check.

Fields

§name: String

Name of the checked VPS.

§

OperationCancelled

Operation cancelled by user signal (Ctrl+C or SIGTERM).

§

ScpUploadCompleted

SCP upload completed.

Fields

§bytes: u64

Bytes transferred.

§ms: u64

Duration in milliseconds.

§

ScpDownloadCompleted

SCP download completed.

Fields

§bytes: u64

Bytes transferred.

§ms: u64

Duration in milliseconds.

§

ScpUploadFileOnly

Upload refused: local path is a directory (file-only, no -r).

§

ScpDownloadLocalNotDirectory

Download refused: local path is already a directory.

§

SftpUploadCompleted

SFTP upload completed (G-SFTP).

Fields

§bytes: u64

Bytes transferred.

§ms: u64

Duration in milliseconds.

§

SftpDownloadCompleted

SFTP download completed (G-SFTP).

Fields

§bytes: u64

Bytes transferred.

§ms: u64

Duration in milliseconds.

§

SftpFsOpDone

SFTP filesystem operation completed on a single path (A4).

A4: mkdir, rmdir, rm and stat built their human line with an inline English format!, so --lang pt-BR silently produced English for exactly the commands an operator reads most often. This is the same defect already recorded for the tunnel banner: a translation that existed but no call site could reach.

Fields

§op: String

Operation name (mkdir, rmdir, rm, stat).

§path: String

Remote path acted upon.

§ms: u64

Duration in milliseconds.

§

SftpFsOpDoneTo

SFTP filesystem operation completed with a destination path (rename).

Fields

§op: String

Operation name (rename).

§path: String

Source path.

§to: String

Destination path.

§ms: u64

Duration in milliseconds.

§

LocalePreferenceSaved

Locale preference saved.

Fields

§lang: String

BCP47 tag written.

§path: String

Path of the preference file.

§

LocalePreferenceCleared

Locale preference cleared.

§

LocaleStatusTitle

Header for locale show output.

§

TunnelLocalListening

Local forward is listening.

Fields

§bind: String

Effective local bind address.

§port: u16

Effective local port (OS-assigned when 0 was requested).

§remote_host: String

Remote destination host.

§remote_port: u16

Remote destination port.

§vps: String

Registry name of the host.

§timeout_ms: u64

Deadline in milliseconds.

§

TunnelSocks5Listening

SOCKS5 proxy is listening.

Fields

§bind: String

Effective local bind address.

§port: u16

Effective local port.

§vps: String

Registry name of the host.

§timeout_ms: u64

Deadline in milliseconds.

§

TunnelStreamLocalListening

Forward to a remote Unix socket is listening.

Fields

§bind: String

Effective local bind address.

§port: u16

Effective local port.

§socket_path: String

Remote Unix socket path.

§vps: String

Registry name of the host.

§timeout_ms: u64

Deadline in milliseconds.

§

TunnelReverseListening

Reverse forward established on the server.

Fields

§remote_bind: String

Address the server bound.

§remote_port: u16

Port the server allocated.

§local_host: String

Local delivery host.

§local_port: u16

Local delivery port.

§vps: String

Registry name of the host.

§timeout_ms: u64

Deadline in milliseconds.

Implementations§

Source§

impl Message

Source

pub fn text(&self, language: Language) -> String

Returns the message string in the specified language.

Deterministic method for tests — does not depend on global state.

Trait Implementations§

Source§

impl Clone for Message

Source§

fn clone(&self) -> Message

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Message

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Eq for Message

Source§

impl PartialEq for Message

Source§

fn eq(&self, other: &Message) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Message

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
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> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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<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