pub enum EncoderInput<'a> {
Item(&'a str),
Pair((&'a str, &'a str)),
}Expand description
Input sequences for Tokenizer::encode.
Variants§
Item(&'a str)
Input with a single sequence.
Pair((&'a str, &'a str))
Input with a pair of sequences. Used in tasks such as extractive
question answering, where the sequence is (query, context).
Trait Implementations§
Source§impl<'a> Clone for EncoderInput<'a>
impl<'a> Clone for EncoderInput<'a>
Source§fn clone(&self) -> EncoderInput<'a>
fn clone(&self) -> EncoderInput<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> Debug for EncoderInput<'a>
impl<'a> Debug for EncoderInput<'a>
Source§impl<'a> From<&'a String> for EncoderInput<'a>
impl<'a> From<&'a String> for EncoderInput<'a>
Source§fn from(val: &'a String) -> EncoderInput<'a>
fn from(val: &'a String) -> EncoderInput<'a>
Converts to this type from the input type.
Source§impl<'a> From<&'a str> for EncoderInput<'a>
Construct a tokenizer input with a single sequence.
impl<'a> From<&'a str> for EncoderInput<'a>
Construct a tokenizer input with a single sequence.
Source§fn from(val: &'a str) -> EncoderInput<'a>
fn from(val: &'a str) -> EncoderInput<'a>
Converts to this type from the input type.
Source§impl<'a> From<(&'a str, &'a str)> for EncoderInput<'a>
Construct a tokenizer input with a pair of sequences.
impl<'a> From<(&'a str, &'a str)> for EncoderInput<'a>
Construct a tokenizer input with a pair of sequences.
Source§impl<'a> PartialEq for EncoderInput<'a>
impl<'a> PartialEq for EncoderInput<'a>
impl<'a> Copy for EncoderInput<'a>
impl<'a> StructuralPartialEq for EncoderInput<'a>
Auto Trait Implementations§
impl<'a> Freeze for EncoderInput<'a>
impl<'a> RefUnwindSafe for EncoderInput<'a>
impl<'a> Send for EncoderInput<'a>
impl<'a> Sync for EncoderInput<'a>
impl<'a> Unpin for EncoderInput<'a>
impl<'a> UnwindSafe for EncoderInput<'a>
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