pub enum TruncationStrategy {
TruncateEnd,
TruncateStart,
TruncateBoth,
SlidingWindow,
}Expand description
Truncation strategies
Variants§
TruncateEnd
Remove tokens from the end
TruncateStart
Remove tokens from the beginning
TruncateBoth
Remove tokens from both ends equally
SlidingWindow
Sliding window approach
Trait Implementations§
Source§impl Clone for TruncationStrategy
impl Clone for TruncationStrategy
Source§fn clone(&self) -> TruncationStrategy
fn clone(&self) -> TruncationStrategy
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 Debug for TruncationStrategy
impl Debug for TruncationStrategy
Source§impl<'de> Deserialize<'de> for TruncationStrategy
impl<'de> Deserialize<'de> for TruncationStrategy
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for TruncationStrategy
impl Serialize for TruncationStrategy
impl Copy for TruncationStrategy
Auto Trait Implementations§
impl Freeze for TruncationStrategy
impl RefUnwindSafe for TruncationStrategy
impl Send for TruncationStrategy
impl Sync for TruncationStrategy
impl Unpin for TruncationStrategy
impl UnsafeUnpin for TruncationStrategy
impl UnwindSafe for TruncationStrategy
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