pub enum KeyConstraint {
Lifetime(u32),
Confirm,
Extension(Extension),
}
Expand description
A key constraint, used to place limitations on how and where a key can be used.
Key constraints are set along with a key when are added to an agent.
Specifically, they appear in special SSH_AGENTC_ADD_*
message variants:
Variants§
Lifetime(u32)
Limit the key’s lifetime by deleting it after the specified duration (in seconds)
Confirm
Require explicit user confirmation for each private key operation using the key.
Extension(Extension)
Experimental or private-use constraints
Contains:
- An extension name indicating the type of the constraint (as a UTF-8 string).
- Extension-specific content
Extension names should be suffixed by the implementation domain as per RFC4251 § 4.2, e.g. “foo@example.com”
Trait Implementations§
Source§impl Clone for KeyConstraint
impl Clone for KeyConstraint
Source§fn clone(&self) -> KeyConstraint
fn clone(&self) -> KeyConstraint
Returns a copy of the value. Read more
1.0.0 · 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 KeyConstraint
impl Debug for KeyConstraint
Source§impl Decode for KeyConstraint
impl Decode for KeyConstraint
Source§impl Encode for KeyConstraint
impl Encode for KeyConstraint
Source§fn encoded_len(&self) -> Result<usize>
fn encoded_len(&self) -> Result<usize>
Get the length of this type encoded in bytes, prior to Base64 encoding.
Source§fn encode(&self, writer: &mut impl Writer) -> Result<()>
fn encode(&self, writer: &mut impl Writer) -> Result<()>
Encode this value using the provided
Writer
.Source§fn encoded_len_prefixed(&self) -> Result<usize, Error>
fn encoded_len_prefixed(&self) -> Result<usize, Error>
Return the length of this type after encoding when prepended with a
uint32
length prefix.Source§fn encode_prefixed(&self, writer: &mut impl Writer) -> Result<(), Error>
fn encode_prefixed(&self, writer: &mut impl Writer) -> Result<(), Error>
Encode this value, first prepending a
uint32
length prefix
set to Encode::encoded_len
.Source§impl PartialEq for KeyConstraint
impl PartialEq for KeyConstraint
impl StructuralPartialEq for KeyConstraint
Auto Trait Implementations§
impl Freeze for KeyConstraint
impl RefUnwindSafe for KeyConstraint
impl Send for KeyConstraint
impl Sync for KeyConstraint
impl Unpin for KeyConstraint
impl UnwindSafe for KeyConstraint
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