Enum harper_core::Punctuation
source · pub enum Punctuation {
Show 20 variants
Period,
Bang,
Question,
Colon,
Semicolon,
Quote(Quote),
Comma,
Hyphen,
OpenSquare,
CloseSquare,
OpenRound,
CloseRound,
Hash,
Apostrophe,
Percent,
ForwardSlash,
Backslash,
LessThan,
GreaterThan,
Equal,
}Variants§
Period
.
Bang
!
Question
?
Colon
:
Semicolon
;
Quote(Quote)
“
Comma
,
Hyphen
OpenSquare
[
CloseSquare
]
OpenRound
(
CloseRound
)
Hash
“
Apostrophe
’
Percent
%
ForwardSlash
/
Backslash
\
LessThan
<
GreaterThan
Equal
Equal
Implementations§
source§impl Punctuation
impl Punctuation
sourcepub const fn is_question(&self) -> bool
pub const fn is_question(&self) -> bool
Returns true if self is of variant Question.
sourcepub const fn is_semicolon(&self) -> bool
pub const fn is_semicolon(&self) -> bool
Returns true if self is of variant Semicolon.
sourcepub fn as_quote(&self) -> Option<&Quote>
pub fn as_quote(&self) -> Option<&Quote>
Returns Some if self is a reference of variant Quote, and None otherwise.
sourcepub fn as_mut_quote(&mut self) -> Option<&mut Quote>
pub fn as_mut_quote(&mut self) -> Option<&mut Quote>
Returns Some if self is a mutable reference of variant Quote, and None otherwise.
sourcepub fn expect_quote(self) -> Quotewhere
Self: Debug,
pub fn expect_quote(self) -> Quotewhere
Self: Debug,
sourcepub fn quote(self) -> Option<Quote>
pub fn quote(self) -> Option<Quote>
Returns Some if self is of variant Quote, and None otherwise.
sourcepub const fn is_open_square(&self) -> bool
pub const fn is_open_square(&self) -> bool
Returns true if self is of variant OpenSquare.
sourcepub const fn is_close_square(&self) -> bool
pub const fn is_close_square(&self) -> bool
Returns true if self is of variant CloseSquare.
sourcepub const fn is_open_round(&self) -> bool
pub const fn is_open_round(&self) -> bool
Returns true if self is of variant OpenRound.
sourcepub const fn is_close_round(&self) -> bool
pub const fn is_close_round(&self) -> bool
Returns true if self is of variant CloseRound.
sourcepub const fn is_apostrophe(&self) -> bool
pub const fn is_apostrophe(&self) -> bool
Returns true if self is of variant Apostrophe.
sourcepub const fn is_percent(&self) -> bool
pub const fn is_percent(&self) -> bool
Returns true if self is of variant Percent.
sourcepub const fn is_forward_slash(&self) -> bool
pub const fn is_forward_slash(&self) -> bool
Returns true if self is of variant ForwardSlash.
sourcepub const fn is_backslash(&self) -> bool
pub const fn is_backslash(&self) -> bool
Returns true if self is of variant Backslash.
sourcepub const fn is_less_than(&self) -> bool
pub const fn is_less_than(&self) -> bool
Returns true if self is of variant LessThan.
sourcepub const fn is_greater_than(&self) -> bool
pub const fn is_greater_than(&self) -> bool
Returns true if self is of variant GreaterThan.
Trait Implementations§
source§impl Clone for Punctuation
impl Clone for Punctuation
source§fn clone(&self) -> Punctuation
fn clone(&self) -> Punctuation
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for Punctuation
impl Debug for Punctuation
source§impl<'de> Deserialize<'de> for Punctuation
impl<'de> Deserialize<'de> for Punctuation
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>,
source§impl PartialEq for Punctuation
impl PartialEq for Punctuation
source§fn eq(&self, other: &Punctuation) -> bool
fn eq(&self, other: &Punctuation) -> bool
self and other values to be equal, and is used
by ==.source§impl PartialOrd for Punctuation
impl PartialOrd for Punctuation
source§fn partial_cmp(&self, other: &Punctuation) -> Option<Ordering>
fn partial_cmp(&self, other: &Punctuation) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self and other) and is used by the <=
operator. Read more