Struct distant_core::DistantSingleKeyCredentials
source · [−]pub struct DistantSingleKeyCredentials {
pub host: Host,
pub port: u16,
pub key: SecretKey32,
pub username: Option<String>,
}
Expand description
Represents credentials used for a distant server that is maintaining a single key across all connections
Fields
host: Host
port: u16
key: SecretKey32
username: Option<String>
Implementations
sourceimpl DistantSingleKeyCredentials
impl DistantSingleKeyCredentials
sourcepub fn find(s: &str) -> Option<DistantSingleKeyCredentials>
pub fn find(s: &str) -> Option<DistantSingleKeyCredentials>
Searches a str for distant://[username]:{key}@{host}:{port}
, returning the first matching
credentials set if found
sourcepub fn try_to_destination(&self) -> Result<Destination>
pub fn try_to_destination(&self) -> Result<Destination>
Converts credentials into a Destination
of the form
distant://[username]:{key}@{host}:{port}
, failing if the credentials would not produce a
valid Destination
Trait Implementations
sourceimpl Clone for DistantSingleKeyCredentials
impl Clone for DistantSingleKeyCredentials
sourcefn clone(&self) -> DistantSingleKeyCredentials
fn clone(&self) -> DistantSingleKeyCredentials
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 DistantSingleKeyCredentials
impl Debug for DistantSingleKeyCredentials
sourceimpl<'de> Deserialize<'de> for DistantSingleKeyCredentials
impl<'de> Deserialize<'de> for DistantSingleKeyCredentials
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 DistantSingleKeyCredentials
impl Display for DistantSingleKeyCredentials
sourceimpl FromStr for DistantSingleKeyCredentials
impl FromStr for DistantSingleKeyCredentials
sourcefn from_str(s: &str) -> Result<Self, Self::Err>
fn from_str(s: &str) -> Result<Self, Self::Err>
Parse distant://[username]:{key}@{host}:{port}
as credentials. Note that this requires the
distant
scheme to be included. If parsing without scheme is desired, call the
[DistantSingleKeyCredentials::try_from_uri_ref
] method instead with require_scheme
set to false
sourceimpl PartialEq<DistantSingleKeyCredentials> for DistantSingleKeyCredentials
impl PartialEq<DistantSingleKeyCredentials> for DistantSingleKeyCredentials
sourcefn eq(&self, other: &DistantSingleKeyCredentials) -> bool
fn eq(&self, other: &DistantSingleKeyCredentials) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
impl Eq for DistantSingleKeyCredentials
impl StructuralEq for DistantSingleKeyCredentials
impl StructuralPartialEq for DistantSingleKeyCredentials
Auto Trait Implementations
impl RefUnwindSafe for DistantSingleKeyCredentials
impl Send for DistantSingleKeyCredentials
impl Sync for DistantSingleKeyCredentials
impl Unpin for DistantSingleKeyCredentials
impl UnwindSafe for DistantSingleKeyCredentials
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