pub enum Technology {
Openpgp,
SSH,
Custom(CustomTechnology),
}
Expand description
The name of a technology backend.
Technology-specific backends implement the logic for each supported verification technology in VOA.
Variants§
Openpgp
The OpenPGP technology.
SSH
The SSH technology.
Custom(CustomTechnology)
Defines a custom Technology
name.
Implementations§
Source§impl Technology
impl Technology
Sourcepub(crate) fn path_segment(&self) -> PathBuf
pub(crate) fn path_segment(&self) -> PathBuf
Returns the path segment for this technology.
Sourcepub fn parser(input: &mut &str) -> ModalResult<Self>
pub fn parser(input: &mut &str) -> ModalResult<Self>
Recognizes a Technology
in a string slice.
Consumes all of its input
.
§Errors
Returns an error if
input
does not contain a variant ofTechnology
,- or one of the characters in
input
is not covered byIdentifierString::valid_chars
.
§Examples
use voa_core::identifiers::Technology;
use winnow::Parser;
assert_eq!(Technology::parser.parse("openpgp")?, Technology::Openpgp);
assert_eq!(Technology::parser.parse("ssh")?, Technology::SSH);
assert_eq!(Technology::parser.parse("test")?.to_string(), "test");
Trait Implementations§
Source§impl Clone for Technology
impl Clone for Technology
Source§fn clone(&self) -> Technology
fn clone(&self) -> Technology
Returns a duplicate 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 Technology
impl Debug for Technology
Source§impl Display for Technology
impl Display for Technology
Source§impl<'_derivative_strum> From<&'_derivative_strum Technology> for &'static str
impl<'_derivative_strum> From<&'_derivative_strum Technology> for &'static str
Source§fn from(x: &'_derivative_strum Technology) -> &'static str
fn from(x: &'_derivative_strum Technology) -> &'static str
Converts to this type from the input type.
Source§impl From<CustomTechnology> for Technology
impl From<CustomTechnology> for Technology
Source§fn from(val: CustomTechnology) -> Self
fn from(val: CustomTechnology) -> Self
Converts to this type from the input type.
Source§impl From<Technology> for &'static str
impl From<Technology> for &'static str
Source§fn from(x: Technology) -> &'static str
fn from(x: Technology) -> &'static str
Converts to this type from the input type.
Source§impl FromStr for Technology
impl FromStr for Technology
Source§fn from_str(s: &str) -> Result<Self, Self::Err>
fn from_str(s: &str) -> Result<Self, Self::Err>
Creates a Technology
from a string slice.
§Note
Delegates to Technology::parser
.
§Errors
Returns an error if Technology::parser
fails.
Source§impl PartialEq for Technology
impl PartialEq for Technology
Source§impl Serialize for Technology
impl Serialize for Technology
impl Eq for Technology
impl StructuralPartialEq for Technology
Auto Trait Implementations§
impl Freeze for Technology
impl RefUnwindSafe for Technology
impl Send for Technology
impl Sync for Technology
impl Unpin for Technology
impl UnwindSafe for Technology
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