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

source

pub const fn is_ellipsis(&self) -> bool

Returns true if self is of variant Ellipsis.

source

pub const fn is_en_dash(&self) -> bool

Returns true if self is of variant EnDash.

source

pub const fn is_em_dash(&self) -> bool

Returns true if self is of variant EmDash.

source

pub const fn is_ampersand(&self) -> bool

Returns true if self is of variant Ampersand.

source

pub const fn is_period(&self) -> bool

Returns true if self is of variant Period.

source

pub const fn is_bang(&self) -> bool

Returns true if self is of variant Bang.

source

pub const fn is_question(&self) -> bool

Returns true if self is of variant Question.

source

pub const fn is_colon(&self) -> bool

Returns true if self is of variant Colon.

source

pub const fn is_semicolon(&self) -> bool

Returns true if self is of variant Semicolon.

source

pub const fn is_quote(&self) -> bool

Returns true if self is of variant Quote.

source

pub fn as_quote(&self) -> Option<&Quote>

Returns Some if self is a reference of variant Quote, and None otherwise.

source

pub fn as_mut_quote(&mut self) -> Option<&mut Quote>

Returns Some if self is a mutable reference of variant Quote, and None otherwise.

source

pub fn expect_quote(self) -> Quote
where Self: Debug,

Unwraps the value, yielding the content of Quote.

§Panics

Panics if the value is not Quote, with a panic message including the content of self.

source

pub fn quote(self) -> Option<Quote>

Returns Some if self is of variant Quote, and None otherwise.

source

pub const fn is_comma(&self) -> bool

Returns true if self is of variant Comma.

source

pub const fn is_hyphen(&self) -> bool

Returns true if self is of variant Hyphen.

source

pub const fn is_open_square(&self) -> bool

Returns true if self is of variant OpenSquare.

source

pub const fn is_close_square(&self) -> bool

Returns true if self is of variant CloseSquare.

source

pub const fn is_open_round(&self) -> bool

Returns true if self is of variant OpenRound.

source

pub const fn is_close_round(&self) -> bool

Returns true if self is of variant CloseRound.

source

pub const fn is_open_curly(&self) -> bool

Returns true if self is of variant OpenCurly.

source

pub const fn is_close_curly(&self) -> bool

Returns true if self is of variant CloseCurly.

source

pub const fn is_hash(&self) -> bool

Returns true if self is of variant Hash.

source

pub const fn is_apostrophe(&self) -> bool

Returns true if self is of variant Apostrophe.

source

pub const fn is_percent(&self) -> bool

Returns true if self is of variant Percent.

source

pub const fn is_forward_slash(&self) -> bool

Returns true if self is of variant ForwardSlash.

source

pub const fn is_backslash(&self) -> bool

Returns true if self is of variant Backslash.

source

pub const fn is_less_than(&self) -> bool

Returns true if self is of variant LessThan.

source

pub const fn is_greater_than(&self) -> bool

Returns true if self is of variant GreaterThan.

source

pub const fn is_equal(&self) -> bool

Returns true if self is of variant Equal.

source

pub const fn is_star(&self) -> bool

Returns true if self is of variant Star.

source

pub const fn is_tilde(&self) -> bool

Returns true if self is of variant Tilde.

source

pub const fn is_at(&self) -> bool

Returns true if self is of variant At.

source

pub const fn is_carrot(&self) -> bool

Returns true if self is of variant Carrot.

source

pub const fn is_plus(&self) -> bool

Returns true if self is of variant Plus.

source

pub const fn is_dollar(&self) -> bool

Returns true if self is of variant Dollar.

source

pub const fn is_pipe(&self) -> bool

Returns true if self is of variant Pipe.

source

pub const fn is_underscore(&self) -> bool

Returns true if self is of variant Underscore.

source§

impl Punctuation

Trait Implementations§

source§

impl Clone for Punctuation

source§

fn clone(&self) -> Punctuation

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Punctuation

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for Punctuation

source§

fn default() -> Punctuation

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for Punctuation

source§

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 Hash for Punctuation

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq for Punctuation

source§

fn eq(&self, other: &Punctuation) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for Punctuation

source§

fn partial_cmp(&self, other: &Punctuation) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl Serialize for Punctuation

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Copy for Punctuation

source§

impl Eq for Punctuation

source§

impl StructuralPartialEq for Punctuation

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CloneToUninit for T
where T: Clone,

source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
source§

impl<T> ToOwned for T
where T: Clone,

source§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

source§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,