pub enum ConnectionMethod {
Localhost(TargetUser),
Ssh2(Ssh2Auth),
}Expand description
Defines the method used to connect to a host.
§Variants
Localhost: Connect to the local machineSsh2: Connect via SSH protocol
§Example
use regent_sdk::hosts::handlers::{ConnectionMethod, TargetUser, Ssh2Auth};
// Localhost connection
let method = ConnectionMethod::Localhost(TargetUser::current_user());
// SSH connection
let method = ConnectionMethod::Ssh2(Ssh2Auth::username_password("creds", Some("files")));Variants§
Trait Implementations§
Source§impl Clone for ConnectionMethod
impl Clone for ConnectionMethod
Source§fn clone(&self) -> ConnectionMethod
fn clone(&self) -> ConnectionMethod
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 ConnectionMethod
impl Debug for ConnectionMethod
Source§impl<'de> Deserialize<'de> for ConnectionMethod
impl<'de> Deserialize<'de> for ConnectionMethod
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 ConnectionMethod
impl RefUnwindSafe for ConnectionMethod
impl Send for ConnectionMethod
impl Sync for ConnectionMethod
impl Unpin for ConnectionMethod
impl UnsafeUnpin for ConnectionMethod
impl UnwindSafe for ConnectionMethod
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