Struct distant_core::SessionInfoFile
source · [−]pub struct SessionInfoFile { /* private fields */ }Expand description
Provides operations related to working with a session that is disk-based
Implementations
sourceimpl SessionInfoFile
impl SessionInfoFile
sourcepub fn new(path: impl Into<PathBuf>, session: SessionInfo) -> Self
pub fn new(path: impl Into<PathBuf>, session: SessionInfo) -> Self
Creates a new inmemory pointer to a session and its file
sourcepub fn as_session(&self) -> &SessionInfo
pub fn as_session(&self) -> &SessionInfo
Returns a reference to the session
Methods from Deref<Target = SessionInfo>
sourcepub async fn to_ip_addr(&self) -> Result<IpAddr>
pub async fn to_ip_addr(&self) -> Result<IpAddr>
Returns the ip address associated with the session based on the host
sourcepub async fn to_socket_addr(&self) -> Result<SocketAddr>
pub async fn to_socket_addr(&self) -> Result<SocketAddr>
Returns socket address associated with the session
sourcepub fn key_to_unprotected_string(&self) -> String
pub fn key_to_unprotected_string(&self) -> String
Converts the session’s key to a hex string
sourcepub fn to_unprotected_string(&self) -> String
pub fn to_unprotected_string(&self) -> String
Converts to unprotected string that exposes the key in the form of
DISTANT CONNECT <host> <port> <key>
Trait Implementations
sourceimpl AsRef<Path> for SessionInfoFile
impl AsRef<Path> for SessionInfoFile
sourceimpl AsRef<SessionInfo> for SessionInfoFile
impl AsRef<SessionInfo> for SessionInfoFile
sourcefn as_ref(&self) -> &SessionInfo
fn as_ref(&self) -> &SessionInfo
Converts this type into a shared reference of the (usually inferred) input type.
sourceimpl Deref for SessionInfoFile
impl Deref for SessionInfoFile
type Target = SessionInfo
type Target = SessionInfo
The resulting type after dereferencing.
sourceimpl From<SessionInfoFile> for SessionInfo
impl From<SessionInfoFile> for SessionInfo
sourcefn from(sf: SessionInfoFile) -> Self
fn from(sf: SessionInfoFile) -> Self
Converts to this type from the input type.
Auto Trait Implementations
impl RefUnwindSafe for SessionInfoFile
impl Send for SessionInfoFile
impl Sync for SessionInfoFile
impl Unpin for SessionInfoFile
impl UnwindSafe for SessionInfoFile
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