Skip to main content

TokenKind

Enum TokenKind 

Source
pub enum TokenKind {
Show 13 variants Word(Option<DictWordMetadata>), Punctuation(Punctuation), Decade, Number(Number), Space(usize), Newline(usize), EmailAddress, Url, Hostname, Unlintable, ParagraphBreak, Regexish, HeadingStart,
}
Expand description

The parsed value of a Token. Has a variety of queries available. If there is a query missing, it may be easy to implement by just calling the delegate_to_metadata macro.

Variants§

§

Word(Option<DictWordMetadata>)

None if the word does not exist in the dictionary.

§

Punctuation(Punctuation)

§

Decade

§

Number(Number)

§

Space(usize)

A sequence of “ “ spaces.

§

Newline(usize)

A sequence of “\n” newlines

§

EmailAddress

§

Url

§

Hostname

§

Unlintable

A special token used for things like inline code blocks that should be ignored by all linters.

§

ParagraphBreak

§

Regexish

§

HeadingStart

Implementations§

Source§

impl TokenKind

Source

pub const fn is_word(&self) -> bool

Returns true if self is of variant Word.

Source

pub fn as_word(&self) -> Option<&Option<DictWordMetadata>>

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

Source

pub fn as_mut_word(&mut self) -> Option<&mut Option<DictWordMetadata>>

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

Source

pub fn expect_word(self) -> Option<DictWordMetadata>
where Self: Debug,

Unwraps the value, yielding the content of Word.

§Panics

Panics if the value is not Word. In debug builds the panic message includes the content of self.

Source

pub fn word(self) -> Option<Option<DictWordMetadata>>

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

Source

pub const fn is_punctuation(&self) -> bool

Returns true if self is of variant Punctuation.

Source

pub fn as_punctuation(&self) -> Option<&Punctuation>

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

Source

pub fn as_mut_punctuation(&mut self) -> Option<&mut Punctuation>

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

Source

pub fn expect_punctuation(self) -> Punctuation
where Self: Debug,

Unwraps the value, yielding the content of Punctuation.

§Panics

Panics if the value is not Punctuation. In debug builds the panic message includes the content of self.

Source

pub fn punctuation(self) -> Option<Punctuation>

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

Source

pub const fn is_decade(&self) -> bool

Returns true if self is of variant Decade.

Source

pub const fn is_number(&self) -> bool

Returns true if self is of variant Number.

Source

pub fn as_number(&self) -> Option<&Number>

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

Source

pub fn as_mut_number(&mut self) -> Option<&mut Number>

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

Source

pub fn expect_number(self) -> Number
where Self: Debug,

Unwraps the value, yielding the content of Number.

§Panics

Panics if the value is not Number. In debug builds the panic message includes the content of self.

Source

pub fn number(self) -> Option<Number>

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

Source

pub const fn is_space(&self) -> bool

Returns true if self is of variant Space.

Source

pub fn as_space(&self) -> Option<&usize>

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

Source

pub fn as_mut_space(&mut self) -> Option<&mut usize>

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

Source

pub fn expect_space(self) -> usize
where Self: Debug,

Unwraps the value, yielding the content of Space.

§Panics

Panics if the value is not Space. In debug builds the panic message includes the content of self.

Source

pub fn space(self) -> Option<usize>

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

Source

pub const fn is_newline(&self) -> bool

Returns true if self is of variant Newline.

Source

pub fn as_newline(&self) -> Option<&usize>

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

Source

pub fn as_mut_newline(&mut self) -> Option<&mut usize>

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

Source

pub fn expect_newline(self) -> usize
where Self: Debug,

Unwraps the value, yielding the content of Newline.

§Panics

Panics if the value is not Newline. In debug builds the panic message includes the content of self.

Source

pub fn newline(self) -> Option<usize>

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

Source

pub const fn is_email_address(&self) -> bool

Returns true if self is of variant EmailAddress.

Source

pub const fn is_url(&self) -> bool

Returns true if self is of variant Url.

Source

pub const fn is_hostname(&self) -> bool

Returns true if self is of variant Hostname.

Source

pub const fn is_unlintable(&self) -> bool

Returns true if self is of variant Unlintable.

Source

pub const fn is_paragraph_break(&self) -> bool

Returns true if self is of variant ParagraphBreak.

Source

pub const fn is_regexish(&self) -> bool

Returns true if self is of variant Regexish.

Source

pub const fn is_heading_start(&self) -> bool

Returns true if self is of variant HeadingStart.

Source§

impl TokenKind

Source

pub fn is_nominal(&self) -> bool

Delegates to DictWordMetadata::is_nominal when this token is a word.

Returns false if the token is not a word.

Source

pub fn is_noun(&self) -> bool

Delegates to DictWordMetadata::is_noun when this token is a word.

Returns false if the token is not a word.

Source

pub fn is_pronoun(&self) -> bool

Delegates to DictWordMetadata::is_pronoun when this token is a word.

Returns false if the token is not a word.

Source

pub fn is_proper_noun(&self) -> bool

Delegates to DictWordMetadata::is_proper_noun when this token is a word.

Returns false if the token is not a word.

Source

pub fn is_singular_nominal(&self) -> bool

Delegates to DictWordMetadata::is_singular_nominal when this token is a word.

Returns false if the token is not a word.

Source

pub fn is_plural_nominal(&self) -> bool

Delegates to DictWordMetadata::is_plural_nominal when this token is a word.

Returns false if the token is not a word.

Source

pub fn is_possessive_nominal(&self) -> bool

Delegates to DictWordMetadata::is_possessive_nominal when this token is a word.

Returns false if the token is not a word.

Source

pub fn is_non_plural_nominal(&self) -> bool

Delegates to DictWordMetadata::is_non_plural_nominal when this token is a word.

Returns false if the token is not a word.

Source

pub fn is_singular_noun(&self) -> bool

Delegates to DictWordMetadata::is_singular_noun when this token is a word.

Returns false if the token is not a word.

Source

pub fn is_singular_noun_only(&self) -> bool

Delegates to DictWordMetadata::is_singular_noun_only when this token is a word.

Returns false if the token is not a word.

Source

pub fn is_plural_noun(&self) -> bool

Delegates to DictWordMetadata::is_plural_noun when this token is a word.

Returns false if the token is not a word.

Source

pub fn is_plural_noun_only(&self) -> bool

Delegates to DictWordMetadata::is_plural_noun_only when this token is a word.

Returns false if the token is not a word.

Source

pub fn is_non_plural_noun(&self) -> bool

Delegates to DictWordMetadata::is_non_plural_noun when this token is a word.

Returns false if the token is not a word.

Source

pub fn is_non_possessive_noun(&self) -> bool

Delegates to DictWordMetadata::is_non_possessive_noun when this token is a word.

Returns false if the token is not a word.

Source

pub fn is_countable_noun(&self) -> bool

Delegates to DictWordMetadata::is_countable_noun when this token is a word.

Returns false if the token is not a word.

Source

pub fn is_non_countable_noun(&self) -> bool

Delegates to DictWordMetadata::is_non_countable_noun when this token is a word.

Returns false if the token is not a word.

Source

pub fn is_mass_noun(&self) -> bool

Delegates to DictWordMetadata::is_mass_noun when this token is a word.

Returns false if the token is not a word.

Source

pub fn is_mass_noun_only(&self) -> bool

Delegates to DictWordMetadata::is_mass_noun_only when this token is a word.

Returns false if the token is not a word.

Source

pub fn is_non_mass_noun(&self) -> bool

Delegates to DictWordMetadata::is_non_mass_noun when this token is a word.

Returns false if the token is not a word.

Source

pub fn is_singular_pronoun(&self) -> bool

Delegates to DictWordMetadata::is_singular_pronoun when this token is a word.

Returns false if the token is not a word.

Source

pub fn is_plural_pronoun(&self) -> bool

Delegates to DictWordMetadata::is_plural_pronoun when this token is a word.

Returns false if the token is not a word.

Source

pub fn is_non_plural_pronoun(&self) -> bool

Delegates to DictWordMetadata::is_non_plural_pronoun when this token is a word.

Returns false if the token is not a word.

Source

pub fn is_reflexive_pronoun(&self) -> bool

Delegates to DictWordMetadata::is_reflexive_pronoun when this token is a word.

Returns false if the token is not a word.

Source

pub fn is_personal_pronoun(&self) -> bool

Delegates to DictWordMetadata::is_personal_pronoun when this token is a word.

Returns false if the token is not a word.

Source

pub fn is_first_person_singular_pronoun(&self) -> bool

Delegates to DictWordMetadata::is_first_person_singular_pronoun when this token is a word.

Returns false if the token is not a word.

Source

pub fn is_first_person_plural_pronoun(&self) -> bool

Delegates to DictWordMetadata::is_first_person_plural_pronoun when this token is a word.

Returns false if the token is not a word.

Source

pub fn is_second_person_pronoun(&self) -> bool

Delegates to DictWordMetadata::is_second_person_pronoun when this token is a word.

Returns false if the token is not a word.

Source

pub fn is_third_person_pronoun(&self) -> bool

Delegates to DictWordMetadata::is_third_person_pronoun when this token is a word.

Returns false if the token is not a word.

Source

pub fn is_third_person_singular_pronoun(&self) -> bool

Delegates to DictWordMetadata::is_third_person_singular_pronoun when this token is a word.

Returns false if the token is not a word.

Source

pub fn is_third_person_plural_pronoun(&self) -> bool

Delegates to DictWordMetadata::is_third_person_plural_pronoun when this token is a word.

Returns false if the token is not a word.

Source

pub fn is_subject_pronoun(&self) -> bool

Delegates to DictWordMetadata::is_subject_pronoun when this token is a word.

Returns false if the token is not a word.

Source

pub fn is_object_pronoun(&self) -> bool

Delegates to DictWordMetadata::is_object_pronoun when this token is a word.

Returns false if the token is not a word.

Source

pub fn is_possessive_noun(&self) -> bool

Delegates to DictWordMetadata::is_possessive_noun when this token is a word.

Returns false if the token is not a word.

Source

pub fn is_possessive_pronoun(&self) -> bool

Delegates to DictWordMetadata::is_possessive_pronoun when this token is a word.

Returns false if the token is not a word.

Source

pub fn is_verb(&self) -> bool

Delegates to DictWordMetadata::is_verb when this token is a word.

Returns false if the token is not a word.

Source

pub fn is_auxiliary_verb(&self) -> bool

Delegates to DictWordMetadata::is_auxiliary_verb when this token is a word.

Returns false if the token is not a word.

Source

pub fn is_linking_verb(&self) -> bool

Delegates to DictWordMetadata::is_linking_verb when this token is a word.

Returns false if the token is not a word.

Source

pub fn is_verb_lemma(&self) -> bool

Delegates to DictWordMetadata::is_verb_lemma when this token is a word.

Returns false if the token is not a word.

Source

pub fn is_verb_past_form(&self) -> bool

Delegates to DictWordMetadata::is_verb_past_form when this token is a word.

Returns false if the token is not a word.

Source

pub fn is_verb_preterite_and_participle_form(&self) -> bool

Delegates to DictWordMetadata::is_verb_preterite_and_participle_form when this token is a word.

Returns false if the token is not a word.

Source

pub fn is_verb_simple_past_form(&self) -> bool

Delegates to DictWordMetadata::is_verb_simple_past_form when this token is a word.

Returns false if the token is not a word.

Source

pub fn is_verb_past_participle_form(&self) -> bool

Delegates to DictWordMetadata::is_verb_past_participle_form when this token is a word.

Returns false if the token is not a word.

Source

pub fn is_verb_simple_past_only(&self) -> bool

Delegates to DictWordMetadata::is_verb_simple_past_only when this token is a word.

Returns false if the token is not a word.

Source

pub fn is_verb_past_participle_only(&self) -> bool

Delegates to DictWordMetadata::is_verb_past_participle_only when this token is a word.

Returns false if the token is not a word.

Source

pub fn is_verb_progressive_form(&self) -> bool

Delegates to DictWordMetadata::is_verb_progressive_form when this token is a word.

Returns false if the token is not a word.

Source

pub fn is_verb_third_person_singular_present_form(&self) -> bool

Delegates to DictWordMetadata::is_verb_third_person_singular_present_form when this token is a word.

Returns false if the token is not a word.

Source

pub fn is_adjective(&self) -> bool

Delegates to DictWordMetadata::is_adjective when this token is a word.

Returns false if the token is not a word.

Source

pub fn is_comparative_adjective(&self) -> bool

Delegates to DictWordMetadata::is_comparative_adjective when this token is a word.

Returns false if the token is not a word.

Source

pub fn is_superlative_adjective(&self) -> bool

Delegates to DictWordMetadata::is_superlative_adjective when this token is a word.

Returns false if the token is not a word.

Source

pub fn is_positive_adjective(&self) -> bool

Delegates to DictWordMetadata::is_positive_adjective when this token is a word.

Returns false if the token is not a word.

Source

pub fn is_adverb(&self) -> bool

Delegates to DictWordMetadata::is_adverb when this token is a word.

Returns false if the token is not a word.

Source

pub fn is_manner_adverb(&self) -> bool

Delegates to DictWordMetadata::is_manner_adverb when this token is a word.

Returns false if the token is not a word.

Source

pub fn is_frequency_adverb(&self) -> bool

Delegates to DictWordMetadata::is_frequency_adverb when this token is a word.

Returns false if the token is not a word.

Source

pub fn is_degree_adverb(&self) -> bool

Delegates to DictWordMetadata::is_degree_adverb when this token is a word.

Returns false if the token is not a word.

Source

pub fn is_determiner(&self) -> bool

Delegates to DictWordMetadata::is_determiner when this token is a word.

Returns false if the token is not a word.

Source

pub fn is_demonstrative_determiner(&self) -> bool

Delegates to DictWordMetadata::is_demonstrative_determiner when this token is a word.

Returns false if the token is not a word.

Source

pub fn is_possessive_determiner(&self) -> bool

Delegates to DictWordMetadata::is_possessive_determiner when this token is a word.

Returns false if the token is not a word.

Source

pub fn is_quantifier(&self) -> bool

Delegates to DictWordMetadata::is_quantifier when this token is a word.

Returns false if the token is not a word.

Source

pub fn is_non_quantifier_determiner(&self) -> bool

Delegates to DictWordMetadata::is_non_quantifier_determiner when this token is a word.

Returns false if the token is not a word.

Source

pub fn is_non_demonstrative_determiner(&self) -> bool

Delegates to DictWordMetadata::is_non_demonstrative_determiner when this token is a word.

Returns false if the token is not a word.

Source

pub fn is_conjunction(&self) -> bool

Delegates to DictWordMetadata::is_conjunction when this token is a word.

Returns false if the token is not a word.

Source

pub fn is_swear(&self) -> bool

Delegates to DictWordMetadata::is_swear when this token is a word.

Returns false if the token is not a word.

Source

pub fn is_abbreviation(&self) -> bool

Delegates to DictWordMetadata::is_abbreviation when this token is a word.

Returns false if the token is not a word.

Source

pub fn is_likely_homograph(&self) -> bool

Delegates to DictWordMetadata::is_likely_homograph when this token is a word.

Returns false if the token is not a word.

Source

pub fn is_lowercase(&self) -> bool

Delegates to DictWordMetadata::is_lowercase when this token is a word.

Returns false if the token is not a word.

Source

pub fn is_titlecase(&self) -> bool

Delegates to DictWordMetadata::is_titlecase when this token is a word.

Returns false if the token is not a word.

Source

pub fn is_allcaps(&self) -> bool

Delegates to DictWordMetadata::is_allcaps when this token is a word.

Returns false if the token is not a word.

Source

pub fn is_lower_camel(&self) -> bool

Delegates to DictWordMetadata::is_lower_camel when this token is a word.

Returns false if the token is not a word.

Source

pub fn is_upper_camel(&self) -> bool

Delegates to DictWordMetadata::is_upper_camel when this token is a word.

Returns false if the token is not a word.

Source

pub fn is_apostrophized(&self) -> bool

Delegates to DictWordMetadata::is_apostrophized when this token is a word.

Returns false if the token is not a word.

Source

pub fn is_roman_numerals(&self) -> bool

Delegates to DictWordMetadata::is_roman_numerals when this token is a word.

Returns false if the token is not a word.

Source

pub fn get_pronoun_person(&self) -> Option<Person>

Source

pub fn is_preposition(&self) -> bool

Source

pub fn is_common_word(&self) -> bool

Source

pub fn is_np_member(&self) -> bool

Checks whether the token is a member of a nominal phrase.

Source

pub fn is_oov(&self) -> bool

Checks whether a word token is out-of-vocabulary (not found in the dictionary).

Returns true if the token is a word that was not found in the dictionary, false if the token is a word found in the dictionary or is not a word token.

Source

pub fn is_cardinal_number(&self) -> bool

Source

pub fn is_ordinal_number(&self) -> bool

Source

pub fn is_open_square(&self) -> bool

Source

pub fn is_close_square(&self) -> bool

Source

pub fn is_less_than(&self) -> bool

Source

pub fn is_greater_than(&self) -> bool

Source

pub fn is_open_round(&self) -> bool

Source

pub fn is_close_round(&self) -> bool

Source

pub fn is_pipe(&self) -> bool

Source

pub fn is_currency(&self) -> bool

Source

pub fn is_ellipsis(&self) -> bool

Source

pub fn is_hyphen(&self) -> bool

Source

pub fn is_plus(&self) -> bool

Source

pub fn is_quote(&self) -> bool

Source

pub fn is_apostrophe(&self) -> bool

Source

pub fn is_period(&self) -> bool

Source

pub fn is_at(&self) -> bool

Source

pub fn is_comma(&self) -> bool

Source

pub fn is_semicolon(&self) -> bool

Source

pub fn is_acute(&self) -> bool

Source

pub fn is_ampersand(&self) -> bool

Source

pub fn is_backslash(&self) -> bool

Source

pub fn is_slash(&self) -> bool

Source

pub fn is_percent(&self) -> bool

Source

pub fn is_degree(&self) -> bool

Source

pub fn is_open_single(&self) -> bool

Source

pub fn is_single_prime(&self) -> bool

Source

pub fn is_double_prime(&self) -> bool

Source

pub fn is_backtick(&self) -> bool

Source

pub fn is_word_like(&self) -> bool

Checks whether a token is word-like–meaning it is more complex than punctuation and can hold semantic meaning in the way a word does.

Source

pub fn is_sentence_terminator(&self) -> bool

Source

pub fn is_case_separator(&self) -> bool

Used by crate::parsers::CollapseIdentifiers TODO: Separate this into two functions and add OR functionality to pattern matching

Source

pub fn is_whitespace(&self) -> bool

Checks whether the token is whitespace.

Source

pub fn is_upos(&self, upos: UPOS) -> bool

Source

pub fn matches_variant_of(&self, other: &Self) -> bool

Checks that self is the same enum variant as other, regardless of whether the inner metadata is also equal.

Source

pub fn with_default_data(&self) -> Self

Produces a copy of self with any inner data replaced with its default value. Useful for making comparisons on just the variant of the enum.

Source

pub fn blank_word() -> Self

Construct a TokenKind::Word with no metadata.

Source

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

Source

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

Trait Implementations§

Source§

impl Clone for TokenKind

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for TokenKind

Source§

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

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

impl Default for TokenKind

Source§

fn default() -> Self

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

impl<'de> Deserialize<'de> for TokenKind

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 Eq for TokenKind

Source§

impl Hash for TokenKind

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 TokenKind

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl PartialOrd for TokenKind

Source§

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

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · 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 (const: unstable) · 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 (const: unstable) · 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 (const: unstable) · 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 TokenKind

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 StructuralPartialEq for TokenKind

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

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

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

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

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

Source§

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

Source§

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

Compare self to key and return true if they are equal.
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> LSend for T
where T: Send + Sync + ?Sized,

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

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 = !

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

fn try_from(value: U) -> Result<T, !>

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<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V