pub struct SshTunnelConfig {
pub name: Option<String>,
pub kind: String,
pub local_port: u16,
pub remote_host: Option<String>,
pub remote_port: Option<u16>,
pub host_alias: String,
}Expand description
Saved SSH tunnel.
[[ssh_tunnels]]
name = "prod-postgres"
kind = "local"
local_port = 5433
remote_host = "127.0.0.1"
remote_port = 5432
host_alias = "prod-db"Fields§
§name: Option<String>§kind: String§local_port: u16§remote_host: Option<String>§remote_port: Option<u16>§host_alias: StringImplementations§
Source§impl SshTunnelConfig
impl SshTunnelConfig
Sourcepub fn to_spec(&self) -> Option<SshTunnelSpec>
pub fn to_spec(&self) -> Option<SshTunnelSpec>
Convert to runtime SshTunnelSpec. Returns None for unknown kinds
or invalid combinations (logged at the call site, not here).
pub fn from_spec(spec: &SshTunnelSpec) -> Self
Trait Implementations§
Source§impl Clone for SshTunnelConfig
impl Clone for SshTunnelConfig
Source§fn clone(&self) -> SshTunnelConfig
fn clone(&self) -> SshTunnelConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 SshTunnelConfig
impl Debug for SshTunnelConfig
Source§impl Default for SshTunnelConfig
impl Default for SshTunnelConfig
Source§fn default() -> SshTunnelConfig
fn default() -> SshTunnelConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for SshTunnelConfigwhere
SshTunnelConfig: Default,
impl<'de> Deserialize<'de> for SshTunnelConfigwhere
SshTunnelConfig: Default,
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 SshTunnelConfig
impl RefUnwindSafe for SshTunnelConfig
impl Send for SshTunnelConfig
impl Sync for SshTunnelConfig
impl Unpin for SshTunnelConfig
impl UnsafeUnpin for SshTunnelConfig
impl UnwindSafe for SshTunnelConfig
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