pub enum PublicationLanguage {
Dutch,
Frisian,
}Expand description
The publication language of something in a document.
Variants§
Implementations§
Source§impl PublicationLanguage
impl PublicationLanguage
Sourcepub fn new(s: impl AsRef<str>) -> Result<Self, EMLError>
pub fn new(s: impl AsRef<str>) -> Result<Self, EMLError>
Create a new PublicationLanguage from a string, validating its format.
Sourcepub fn from_eml_value(
s: impl AsRef<str>,
) -> Result<Self, UnknownPublicationLanguageError>
pub fn from_eml_value( s: impl AsRef<str>, ) -> Result<Self, UnknownPublicationLanguageError>
Parse a publication language from its string representation.
Sourcepub fn to_eml_value(&self) -> &'static str
pub fn to_eml_value(&self) -> &'static str
Get the &str representation of this PublicationLanguage.
Trait Implementations§
Source§impl Clone for PublicationLanguage
impl Clone for PublicationLanguage
Source§fn clone(&self) -> PublicationLanguage
fn clone(&self) -> PublicationLanguage
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 PublicationLanguage
impl Debug for PublicationLanguage
Source§impl Default for PublicationLanguage
impl Default for PublicationLanguage
Source§fn default() -> PublicationLanguage
fn default() -> PublicationLanguage
Returns the “default value” for a type. Read more
Source§impl Hash for PublicationLanguage
impl Hash for PublicationLanguage
Source§impl PartialEq for PublicationLanguage
impl PartialEq for PublicationLanguage
Source§impl StringValueData for PublicationLanguage
impl StringValueData for PublicationLanguage
Source§type Error = UnknownPublicationLanguageError
type Error = UnknownPublicationLanguageError
The error type returned when parsing the value from a string fails.
Source§fn parse_from_str(s: &str) -> Result<Self, Self::Error>where
Self: Sized,
fn parse_from_str(s: &str) -> Result<Self, Self::Error>where
Self: Sized,
Parse the value from a string.
Source§fn to_raw_value(&self) -> String
fn to_raw_value(&self) -> String
Convert the value to its raw string representation.
impl Copy for PublicationLanguage
impl Eq for PublicationLanguage
impl StructuralPartialEq for PublicationLanguage
Auto Trait Implementations§
impl Freeze for PublicationLanguage
impl RefUnwindSafe for PublicationLanguage
impl Send for PublicationLanguage
impl Sync for PublicationLanguage
impl Unpin for PublicationLanguage
impl UnsafeUnpin for PublicationLanguage
impl UnwindSafe for PublicationLanguage
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