pub struct Encoding {
pub ids: Vec<TokenId>,
pub attention_mask: Vec<u32>,
}Expand description
The result of encoding a single sequence with an EncodeConfig.
Fields§
§ids: Vec<TokenId>The token ids, including any special/padding tokens.
attention_mask: Vec<u32>A mask that is 1 for real (or special) tokens and 0 for padding.
Implementations§
Trait Implementations§
impl Eq for Encoding
impl StructuralPartialEq for Encoding
Auto Trait Implementations§
impl Freeze for Encoding
impl RefUnwindSafe for Encoding
impl Send for Encoding
impl Sync for Encoding
impl Unpin for Encoding
impl UnsafeUnpin for Encoding
impl UnwindSafe for Encoding
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
Mutably borrows from an owned value. Read more