Enum wordpieces::WordPiece[][src]

pub enum WordPiece<'a> {
    Found {
        piece: &'a str,
        idx: u64,
    },
    Missing,
}

A single word piece.

Variants

Found

The next found word piece.

Fields of Found

piece: &'a stridx: u64
Missing

No piece was found for the (remaining part of) the word.

Implementations

impl<'a> WordPiece<'a>[src]

pub fn idx(&self) -> Option<u64>[src]

Unwrap an index if present.

pub fn piece(&self) -> Option<&'a str>[src]

Unwrap a piece if present.

Trait Implementations

impl<'a> Debug for WordPiece<'a>[src]

impl<'a> Eq for WordPiece<'a>[src]

impl<'a> PartialEq<WordPiece<'a>> for WordPiece<'a>[src]

impl<'a> StructuralEq for WordPiece<'a>[src]

impl<'a> StructuralPartialEq for WordPiece<'a>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for WordPiece<'a>[src]

impl<'a> Send for WordPiece<'a>[src]

impl<'a> Sync for WordPiece<'a>[src]

impl<'a> Unpin for WordPiece<'a>[src]

impl<'a> UnwindSafe for WordPiece<'a>[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.