Enum harper_core::Punctuation
source · pub enum Punctuation {
Show 34 variants
Ellipsis,
EnDash,
EmDash,
Ampersand,
Period,
Bang,
Question,
Colon,
Semicolon,
Quote(Quote),
Comma,
Hyphen,
OpenSquare,
CloseSquare,
OpenRound,
CloseRound,
OpenCurly,
CloseCurly,
Hash,
Apostrophe,
Percent,
ForwardSlash,
Backslash,
LessThan,
GreaterThan,
Equal,
Star,
Tilde,
At,
Carrot,
Plus,
Dollar,
Pipe,
Underscore,
}
Variants§
Ellipsis
…
EnDash
–
EmDash
—
Ampersand
&
Period
.
Bang
!
Question
?
Colon
:
Semicolon
;
Quote(Quote)
"
Comma
,
Hyphen
-
OpenSquare
[
CloseSquare
]
OpenRound
(
CloseRound
)
OpenCurly
{
CloseCurly
}
Hash
"
Apostrophe
'
Percent
%
ForwardSlash
/
Backslash
\
LessThan
<
GreaterThan
>
Equal
=
Star
*
Tilde
~
At
@
Carrot
^
Plus
+
Dollar
$
Pipe
|
Underscore
_
Implementations§
source§impl Punctuation
impl Punctuation
sourcepub const fn is_ellipsis(&self) -> bool
pub const fn is_ellipsis(&self) -> bool
Returns true
if self
is of variant Ellipsis
.
sourcepub const fn is_en_dash(&self) -> bool
pub const fn is_en_dash(&self) -> bool
Returns true
if self
is of variant EnDash
.
sourcepub const fn is_em_dash(&self) -> bool
pub const fn is_em_dash(&self) -> bool
Returns true
if self
is of variant EmDash
.
sourcepub const fn is_ampersand(&self) -> bool
pub const fn is_ampersand(&self) -> bool
Returns true
if self
is of variant Ampersand
.
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_open_curly(&self) -> bool
pub const fn is_open_curly(&self) -> bool
Returns true
if self
is of variant OpenCurly
.
sourcepub const fn is_close_curly(&self) -> bool
pub const fn is_close_curly(&self) -> bool
Returns true
if self
is of variant CloseCurly
.
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
.
sourcepub const fn is_underscore(&self) -> bool
pub const fn is_underscore(&self) -> bool
Returns true
if self
is of variant Underscore
.
source§impl Punctuation
impl Punctuation
pub fn from_char(c: char) -> Option<Punctuation>
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 Default for Punctuation
impl Default for Punctuation
source§fn default() -> Punctuation
fn default() -> 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 Hash for Punctuation
impl Hash for Punctuation
source§impl PartialEq for Punctuation
impl PartialEq for Punctuation
source§impl PartialOrd for Punctuation
impl PartialOrd for Punctuation
source§impl Serialize for Punctuation
impl Serialize for Punctuation
impl Copy for Punctuation
impl Eq for Punctuation
impl StructuralPartialEq for Punctuation
Auto Trait Implementations§
impl Freeze for Punctuation
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more