pub struct Client<S: Read + Write> { /* private fields */ }
Expand description
Blocking SSH agent client.
Implementations§
Source§impl<S: Read + Write> Client<S>
impl<S: Read + Write> Client<S>
Sourcepub fn into_inner(self) -> S
pub fn into_inner(self) -> S
Extracts inner stream by consuming this object.
Sourcepub fn request_identities(&mut self) -> Result<Vec<Identity>, AgentError>
pub fn request_identities(&mut self) -> Result<Vec<Identity>, AgentError>
Request a list of keys managed by this session.
Sourcepub fn sign(&mut self, request: SignRequest) -> Result<Signature, AgentError>
pub fn sign(&mut self, request: SignRequest) -> Result<Signature, AgentError>
Perform a private key signature operation.
Sourcepub fn add_identity(&mut self, identity: AddIdentity) -> Result<(), AgentError>
pub fn add_identity(&mut self, identity: AddIdentity) -> Result<(), AgentError>
Add a private key to the agent.
Sourcepub fn add_identity_constrained(
&mut self,
identity: AddIdentityConstrained,
) -> Result<(), AgentError>
pub fn add_identity_constrained( &mut self, identity: AddIdentityConstrained, ) -> Result<(), AgentError>
Add a private key to the agent with a set of constraints.
Sourcepub fn remove_identity(
&mut self,
identity: RemoveIdentity,
) -> Result<(), AgentError>
pub fn remove_identity( &mut self, identity: RemoveIdentity, ) -> Result<(), AgentError>
Remove private key from an agent.
Sourcepub fn remove_all_identities(&mut self) -> Result<(), AgentError>
pub fn remove_all_identities(&mut self) -> Result<(), AgentError>
Remove all keys from an agent.
Sourcepub fn add_smartcard_key(&mut self, key: SmartcardKey) -> Result<(), AgentError>
pub fn add_smartcard_key(&mut self, key: SmartcardKey) -> Result<(), AgentError>
Add a key stored on a smartcard.
Sourcepub fn add_smartcard_key_constrained(
&mut self,
key: AddSmartcardKeyConstrained,
) -> Result<(), AgentError>
pub fn add_smartcard_key_constrained( &mut self, key: AddSmartcardKeyConstrained, ) -> Result<(), AgentError>
Add a key stored on a smartcard with a set of constraints.
Sourcepub fn remove_smartcard_key(
&mut self,
key: SmartcardKey,
) -> Result<(), AgentError>
pub fn remove_smartcard_key( &mut self, key: SmartcardKey, ) -> Result<(), AgentError>
Remove a smartcard key from the agent.
Sourcepub fn lock(&mut self, key: String) -> Result<(), AgentError>
pub fn lock(&mut self, key: String) -> Result<(), AgentError>
Temporarily lock the agent with a password.
Trait Implementations§
Auto Trait Implementations§
impl<S> Freeze for Client<S>where
S: Freeze,
impl<S> RefUnwindSafe for Client<S>where
S: RefUnwindSafe,
impl<S> Send for Client<S>where
S: Send,
impl<S> Sync for Client<S>where
S: Sync,
impl<S> Unpin for Client<S>where
S: Unpin,
impl<S> UnwindSafe for Client<S>where
S: UnwindSafe,
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