pub enum OpenPgpVersion {
V4,
V6,
}
Expand description
The OpenPGP version
Variants§
Trait Implementations§
source§impl AsRef<str> for OpenPgpVersion
impl AsRef<str> for OpenPgpVersion
source§impl Clone for OpenPgpVersion
impl Clone for OpenPgpVersion
source§fn clone(&self) -> OpenPgpVersion
fn clone(&self) -> OpenPgpVersion
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 OpenPgpVersion
impl Debug for OpenPgpVersion
source§impl Default for OpenPgpVersion
impl Default for OpenPgpVersion
source§fn default() -> OpenPgpVersion
fn default() -> OpenPgpVersion
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for OpenPgpVersion
impl<'de> Deserialize<'de> for OpenPgpVersion
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
source§impl Display for OpenPgpVersion
impl Display for OpenPgpVersion
source§impl<'_derivative_strum> From<&'_derivative_strum OpenPgpVersion> for &'static str
impl<'_derivative_strum> From<&'_derivative_strum OpenPgpVersion> for &'static str
source§fn from(x: &'_derivative_strum OpenPgpVersion) -> &'static str
fn from(x: &'_derivative_strum OpenPgpVersion) -> &'static str
Converts to this type from the input type.
source§impl From<OpenPgpVersion> for &'static str
impl From<OpenPgpVersion> for &'static str
source§fn from(x: OpenPgpVersion) -> &'static str
fn from(x: OpenPgpVersion) -> &'static str
Converts to this type from the input type.
source§impl From<OpenPgpVersion> for String
impl From<OpenPgpVersion> for String
source§fn from(value: OpenPgpVersion) -> Self
fn from(value: OpenPgpVersion) -> Self
Converts to this type from the input type.
source§impl FromStr for OpenPgpVersion
impl FromStr for OpenPgpVersion
source§fn from_str(s: &str) -> Result<Self, Self::Err>
fn from_str(s: &str) -> Result<Self, Self::Err>
Creates an OpenPgpVersion
from a string slice
Only valid OpenPGP versions are considered:
§Errors
Returns an error if the provided string slice does not represent a valid OpenPGP version.
§Examples
use std::str::FromStr;
use nethsm::OpenPgpVersion;
assert_eq!(OpenPgpVersion::from_str("4")?, OpenPgpVersion::V4);
assert_eq!(OpenPgpVersion::from_str("6")?, OpenPgpVersion::V6);
assert!(OpenPgpVersion::from_str("5").is_err());
source§impl Hash for OpenPgpVersion
impl Hash for OpenPgpVersion
source§impl IntoEnumIterator for OpenPgpVersion
impl IntoEnumIterator for OpenPgpVersion
type Iterator = OpenPgpVersionIter
fn iter() -> OpenPgpVersionIter ⓘ
source§impl PartialEq for OpenPgpVersion
impl PartialEq for OpenPgpVersion
source§impl Serialize for OpenPgpVersion
impl Serialize for OpenPgpVersion
source§impl TryFrom<String> for OpenPgpVersion
impl TryFrom<String> for OpenPgpVersion
impl Copy for OpenPgpVersion
impl Eq for OpenPgpVersion
impl StructuralPartialEq for OpenPgpVersion
Auto Trait Implementations§
impl Freeze for OpenPgpVersion
impl RefUnwindSafe for OpenPgpVersion
impl Send for OpenPgpVersion
impl Sync for OpenPgpVersion
impl Unpin for OpenPgpVersion
impl UnwindSafe for OpenPgpVersion
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)