25 lines · 675 B · Rust
RawDownload
use thiserror::Error; #[derive(Error, Debug)]pub enum ProxyLaunchError {    #[error("Attempted reconnect, but server not running.")]    ServerNotRunning,} impl ProxyLaunchError {    pub fn to_exit_code(&self) -> i32 {        match self {            // We're using 90 as the exit code, because 0-78 are often taken            // by shells and other conventions and >128 also has certain meanings            // in certain contexts.            Self::ServerNotRunning => 90,        }    }     pub fn from_exit_code(exit_code: i32) -> Option<Self> {        match exit_code {            90 => Some(Self::ServerNotRunning),            _ => None,        }    }}

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t