pub struct TargetUser {
pub user_kind: TargetUserKind,
}Expand description
Specifies the target user for a host connection.
This struct is used during the connection setup phase and holds references to secrets rather than the secrets themselves. The actual secrets are retrieved from the secret provider when the connection is established.
§Example
use regent_sdk::hosts::handlers::{ConnectionMethod, TargetUser};
// Connect as the current user
let target = TargetUser::current_user();
// Connect as a specific user (secret will be retrieved from provider)
let target = TargetUser::user("admin_credentials", Some("files".to_string()));Fields§
§user_kind: TargetUserKindThe kind of user to connect as.
Implementations§
Trait Implementations§
Source§impl Clone for TargetUser
impl Clone for TargetUser
Source§fn clone(&self) -> TargetUser
fn clone(&self) -> TargetUser
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 TargetUser
impl Debug for TargetUser
Source§impl<'de> Deserialize<'de> for TargetUser
impl<'de> Deserialize<'de> for TargetUser
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 TargetUser
impl RefUnwindSafe for TargetUser
impl Send for TargetUser
impl Sync for TargetUser
impl Unpin for TargetUser
impl UnsafeUnpin for TargetUser
impl UnwindSafe for TargetUser
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