[][src]Struct sentencepiece::PieceWithId

pub struct PieceWithId {
    pub piece: String,
    pub id: u32,
    pub span: (u32, u32),

Sentence piece with its identifier and string span.


piece: String

The sentence piece as a string.

id: u32

The vocabulary identifier of the sentence piece.

span: (u32, u32)

The span of the sentence piece in the tokenized string.

The span is encoded as the byte offsets [begin, end).

Trait Implementations

impl Clone for PieceWithId[src]

impl Debug for PieceWithId[src]

impl Eq for PieceWithId[src]

impl PartialEq<PieceWithId> for PieceWithId[src]

impl StructuralEq for PieceWithId[src]

impl StructuralPartialEq for PieceWithId[src]

Auto Trait Implementations

impl RefUnwindSafe for PieceWithId

impl Send for PieceWithId

impl Sync for PieceWithId

impl Unpin for PieceWithId

impl UnwindSafe for PieceWithId

Blanket Implementations

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

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

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

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

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

impl<T> ToOwned for T where
    T: Clone

type Owned = T

The resulting type after obtaining ownership.

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.