pub struct CustomTechnology(IdentifierString);
Expand description
A CustomTechnology
defines a technology name that is not covered by the variants defined in
Technology
.
Tuple Fields§
§0: IdentifierString
Implementations§
Source§impl CustomTechnology
impl CustomTechnology
Sourcepub fn new(value: IdentifierString) -> Self
pub fn new(value: IdentifierString) -> Self
Creates a new CustomTechnology
instance.
Sourcepub fn parser(input: &mut &str) -> ModalResult<Self>
pub fn parser(input: &mut &str) -> ModalResult<Self>
Recognizes a CustomTechnology
in a string slice.
Consumes all of its input
.
§Errors
Returns an error if one of the characters in input
is not covered by
IdentifierString::valid_chars
.
§Examples
use voa_core::identifiers::CustomTechnology;
use winnow::Parser;
assert_eq!(CustomTechnology::parser.parse("test")?.to_string(), "test");
Trait Implementations§
Source§impl AsRef<str> for CustomTechnology
impl AsRef<str> for CustomTechnology
Source§impl Clone for CustomTechnology
impl Clone for CustomTechnology
Source§fn clone(&self) -> CustomTechnology
fn clone(&self) -> CustomTechnology
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 CustomTechnology
impl Debug for CustomTechnology
Source§impl Display for CustomTechnology
impl Display for CustomTechnology
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 FromStr for CustomTechnology
impl FromStr for CustomTechnology
Source§fn from_str(s: &str) -> Result<Self, Self::Err>
fn from_str(s: &str) -> Result<Self, Self::Err>
Creates a CustomTechnology
from a string slice.
§Note
Delegates to CustomTechnology::parser
.
§Errors
Returns an error if CustomTechnology::parser
fails.
Source§impl PartialEq for CustomTechnology
impl PartialEq for CustomTechnology
Source§impl Serialize for CustomTechnology
impl Serialize for CustomTechnology
impl Eq for CustomTechnology
impl StructuralPartialEq for CustomTechnology
Auto Trait Implementations§
impl Freeze for CustomTechnology
impl RefUnwindSafe for CustomTechnology
impl Send for CustomTechnology
impl Sync for CustomTechnology
impl Unpin for CustomTechnology
impl UnwindSafe for CustomTechnology
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