pub enum Format {
OpenPgp,
X509,
Ssh,
}Available on crate feature
command only.Expand description
A Git-supported signature format.
Variants§
OpenPgp
An OpenPGP signature made with gpg by default.
X509
An X.509 signature made with gpgsm by default.
Ssh
An SSH signature made with ssh-keygen by default.
Implementations§
Source§impl Format
impl Format
Sourcepub fn parse(value: &BStr) -> Result<Format, Error>
pub fn parse(value: &BStr) -> Result<Format, Error>
Parse a case-insensitive format name, ignoring surrounding whitespace. Unknown names are unsupported; empty or malformed names are validation failures.
Sourcepub fn from_signature(signature: &[u8]) -> Option<Format>
pub fn from_signature(signature: &[u8]) -> Option<Format>
Detect the format from the signature’s armor header, or return None if it is unsupported.
Trait Implementations§
impl Copy for Format
impl Eq for Format
impl StructuralPartialEq for Format
Auto Trait Implementations§
impl Forget for Format
impl Freeze for Format
impl Move for Format
impl RefUnwindSafe for Format
impl Send for Format
impl Sync for Format
impl Unpin for Format
impl UnsafeUnpin for Format
impl UnwindSafe for Format
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.