Enum harper_core::Punctuation
source · pub enum Punctuation {
Show 14 variants
Period,
Bang,
Question,
Colon,
Semicolon,
Quote(Quote),
Comma,
Hyphen,
OpenSquare,
CloseSquare,
OpenRound,
CloseRound,
Hash,
Apostrophe,
}
Variants§
Period
.
Bang
!
Question
?
Colon
:
Semicolon
;
Quote(Quote)
“
Comma
,
Hyphen
OpenSquare
[
CloseSquare
]
OpenRound
(
CloseRound
)
Hash
“
Apostrophe
’
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
.
Trait Implementations§
source§impl Clone for Punctuation
impl Clone for Punctuation
source§fn clone(&self) -> Punctuation
fn clone(&self) -> Punctuation
Returns a copy 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 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>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq for Punctuation
impl PartialEq for Punctuation
source§fn eq(&self, other: &Punctuation) -> bool
fn eq(&self, other: &Punctuation) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for Punctuation
impl Serialize for Punctuation
impl Copy for Punctuation
impl Eq for Punctuation
impl StructuralEq for Punctuation
impl StructuralPartialEq for Punctuation
Auto Trait Implementations§
impl RefUnwindSafe for Punctuation
impl Send for Punctuation
impl Sync for Punctuation
impl Unpin for Punctuation
impl UnwindSafe for Punctuation
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