Struct distant::config::ServerListenConfig
source · [−]pub struct ServerListenConfig {
pub host: Option<BindAddress>,
pub port: Option<PortRange>,
pub use_ipv6: bool,
pub shutdown_after: Option<f32>,
pub current_dir: Option<PathBuf>,
}
Fields
host: Option<BindAddress>
Control the IP address that the distant binds to
There are three options here:
-
ssh
: the server will reply from the IP address that the SSH connection came from (as found in the SSH_CONNECTION environment variable). This is useful for multihomed servers. -
any
: the server will reply on the default interface and will not bind to a particular IP address. This can be useful if the connection is made through ssh or another tool that makes the SSH connection appear to come from localhost. -
IP
: the server will attempt to bind to the specified IP address.
port: Option<PortRange>
Set the port(s) that the server will attempt to bind to
This can be in the form of PORT1 or PORT1:PORTN to provide a range of ports.
With --port 0
, the server will let the operating system pick an available TCP port.
Please note that this option does not affect the server-side port used by SSH
use_ipv6: bool
If specified, will bind to the ipv6 interface if host is “any” instead of ipv4
shutdown_after: Option<f32>
The time in seconds before shutting down the server if there are no active connections. The countdown begins once all connections have closed and stops when a new connection is made. In not specified, the server will not shutdown at any point when there are no active connections.
current_dir: Option<PathBuf>
Changes the current working directory (cwd) to the specified directory
Trait Implementations
sourceimpl Args for ServerListenConfig
impl Args for ServerListenConfig
sourceimpl Debug for ServerListenConfig
impl Debug for ServerListenConfig
sourceimpl Default for ServerListenConfig
impl Default for ServerListenConfig
sourcefn default() -> ServerListenConfig
fn default() -> ServerListenConfig
Returns the “default value” for a type. Read more
sourceimpl<'de> Deserialize<'de> for ServerListenConfig
impl<'de> Deserialize<'de> for ServerListenConfig
sourcefn 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
sourceimpl From<Map> for ServerListenConfig
impl From<Map> for ServerListenConfig
sourceimpl From<ServerListenConfig> for Map
impl From<ServerListenConfig> for Map
sourcefn from(config: ServerListenConfig) -> Self
fn from(config: ServerListenConfig) -> Self
Converts to this type from the input type.
sourceimpl FromArgMatches for ServerListenConfig
impl FromArgMatches for ServerListenConfig
sourcefn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Instantiate Self
from ArgMatches
, parsing the arguments as needed. Read more
sourcefn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches
) -> Result<Self, Error>
fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches
) -> Result<Self, Error>
Instantiate Self
from ArgMatches
, parsing the arguments as needed. Read more
sourcefn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches
) -> Result<(), Error>
fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches
) -> Result<(), Error>
Assign values from ArgMatches
to self
.
sourcefn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches
) -> Result<(), Error>
fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches
) -> Result<(), Error>
Assign values from ArgMatches
to self
.
sourceimpl Serialize for ServerListenConfig
impl Serialize for ServerListenConfig
Auto Trait Implementations
impl RefUnwindSafe for ServerListenConfig
impl Send for ServerListenConfig
impl Sync for ServerListenConfig
impl Unpin for ServerListenConfig
impl UnwindSafe for ServerListenConfig
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> CompatExt for T
impl<T> CompatExt for T
fn compat_ref(&self) -> Compat<&T>
fn compat_ref(&self) -> Compat<&T>
Applies the [Compat
] adapter by shared reference. Read more
fn compat_mut(&mut self) -> Compat<&mut T>
fn compat_mut(&mut self) -> Compat<&mut T>
Applies the [Compat
] adapter by mutable reference. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
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
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more