pub enum VotingChannelType {
Polling,
Postal,
}Expand description
Voting channel used in the election.
Variants§
Implementations§
Source§impl VotingChannelType
impl VotingChannelType
Sourcepub fn new(s: impl AsRef<str>) -> Result<Self, EMLError>
pub fn new(s: impl AsRef<str>) -> Result<Self, EMLError>
Create a new VotingChannelType from a string, validating its format.
Sourcepub fn from_eml_value(
s: impl AsRef<str>,
) -> Result<Self, UnknownVotingChannelError>
pub fn from_eml_value( s: impl AsRef<str>, ) -> Result<Self, UnknownVotingChannelError>
Create a VotingChannelType from a &str, if possible.
Sourcepub fn to_eml_value(&self) -> &'static str
pub fn to_eml_value(&self) -> &'static str
Get the &str representation of this VotingChannelType.
Trait Implementations§
Source§impl Clone for VotingChannelType
impl Clone for VotingChannelType
Source§fn clone(&self) -> VotingChannelType
fn clone(&self) -> VotingChannelType
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 VotingChannelType
impl Debug for VotingChannelType
Source§impl Hash for VotingChannelType
impl Hash for VotingChannelType
Source§impl PartialEq for VotingChannelType
impl PartialEq for VotingChannelType
Source§impl StringValueData for VotingChannelType
impl StringValueData for VotingChannelType
Source§type Error = UnknownVotingChannelError
type Error = UnknownVotingChannelError
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 VotingChannelType
impl Eq for VotingChannelType
impl StructuralPartialEq for VotingChannelType
Auto Trait Implementations§
impl Freeze for VotingChannelType
impl RefUnwindSafe for VotingChannelType
impl Send for VotingChannelType
impl Sync for VotingChannelType
impl Unpin for VotingChannelType
impl UnsafeUnpin for VotingChannelType
impl UnwindSafe for VotingChannelType
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