Struct distant_core::Destination
source · [−]pub struct Destination(_);Expand description
distant connects and logs into the specified destination, which may be specified as either
hostname:port where an attempt to connect to a distant server will be made, or a URI of
one of the following forms:
distant://hostname:port- connect to a distant serverssh://[user@]hostname[:port]- connect to an SSH server
Implementations
sourceimpl Destination
impl Destination
sourcepub fn scheme(&self) -> Option<&str>
pub fn scheme(&self) -> Option<&str>
Returns a reference to the scheme associated with the destination, if it has one
sourcepub fn to_host_string(&self) -> String
pub fn to_host_string(&self) -> String
Returns the host of the destination as a string
sourcepub fn username(&self) -> Option<&str>
pub fn username(&self) -> Option<&str>
Returns the username tied with the destination if it has one
sourcepub fn password(&self) -> Option<&str>
pub fn password(&self) -> Option<&str>
Returns the password tied with the destination if it has one
sourcepub fn replace_host(&mut self, host: &str) -> Result<(), URIReferenceError>
pub fn replace_host(&mut self, host: &str) -> Result<(), URIReferenceError>
Replaces the host of the destination
sourcepub fn is_host_global(&self) -> bool
pub fn is_host_global(&self) -> bool
Indicates whether the host destination is globally routable
sourcepub fn is_distant(&self) -> bool
pub fn is_distant(&self) -> bool
Returns true if destination represents a distant server
sourcepub fn as_uri_ref(&self) -> &URIReference<'static>
pub fn as_uri_ref(&self) -> &URIReference<'static>
Returns reference to inner URIReference
Trait Implementations
sourceimpl AsRef<Destination> for &Destination
impl AsRef<Destination> for &Destination
sourcefn as_ref(&self) -> &Destination
fn as_ref(&self) -> &Destination
Converts this type into a shared reference of the (usually inferred) input type.
sourceimpl AsRef<URIReference<'static>> for Destination
impl AsRef<URIReference<'static>> for Destination
sourcefn as_ref(&self) -> &URIReference<'static>
fn as_ref(&self) -> &URIReference<'static>
Converts this type into a shared reference of the (usually inferred) input type.
sourceimpl Clone for Destination
impl Clone for Destination
sourcefn clone(&self) -> Destination
fn clone(&self) -> Destination
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for Destination
impl Debug for Destination
sourceimpl<'de> Deserialize<'de> for Destination
impl<'de> Deserialize<'de> for Destination
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 Display for Destination
impl Display for Destination
sourceimpl FromStr for Box<Destination>
impl FromStr for Box<Destination>
sourceimpl FromStr for Destination
impl FromStr for Destination
sourceimpl Hash for Destination
impl Hash for Destination
sourceimpl PartialEq<Destination> for Destination
impl PartialEq<Destination> for Destination
sourcefn eq(&self, other: &Destination) -> bool
fn eq(&self, other: &Destination) -> bool
This method tests for self and other values to be equal, and is used
by ==. Read more
sourcefn ne(&self, other: &Destination) -> bool
fn ne(&self, other: &Destination) -> bool
This method tests for !=.
sourceimpl Serialize for Destination
impl Serialize for Destination
sourceimpl<'a> TryFrom<URI<'a>> for Destination
impl<'a> TryFrom<URI<'a>> for Destination
sourceimpl<'a> TryFrom<URIReference<'a>> for Destination
impl<'a> TryFrom<URIReference<'a>> for Destination
type Error = DestinationError
type Error = DestinationError
The type returned in the event of a conversion error.
sourcefn try_from(uri_ref: URIReference<'a>) -> Result<Self, Self::Error>
fn try_from(uri_ref: URIReference<'a>) -> Result<Self, Self::Error>
Performs the conversion.
impl Eq for Destination
impl StructuralEq for Destination
impl StructuralPartialEq for Destination
Auto Trait Implementations
impl RefUnwindSafe for Destination
impl Send for Destination
impl Sync for Destination
impl Unpin for Destination
impl UnwindSafe for Destination
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
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