pub enum Truncation {
None,
Fixed(usize),
}Expand description
How an over-long sequence should be shortened.
Variants§
None
Never truncate.
Fixed(usize)
Truncate to at most n ids, including any special tokens added by
EncodeConfig::add_special_tokens.
Trait Implementations§
Source§impl Clone for Truncation
impl Clone for Truncation
Source§fn clone(&self) -> Truncation
fn clone(&self) -> Truncation
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for Truncation
Source§impl Debug for Truncation
impl Debug for Truncation
Source§impl Default for Truncation
impl Default for Truncation
Source§fn default() -> Truncation
fn default() -> Truncation
Returns the “default value” for a type. Read more
impl Eq for Truncation
Source§impl PartialEq for Truncation
impl PartialEq for Truncation
impl StructuralPartialEq for Truncation
Auto Trait Implementations§
impl Freeze for Truncation
impl RefUnwindSafe for Truncation
impl Send for Truncation
impl Sync for Truncation
impl Unpin for Truncation
impl UnsafeUnpin for Truncation
impl UnwindSafe for Truncation
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