pub enum Padding {
None,
Fixed(usize),
Longest,
}Expand description
How a sequence (or batch of sequences) should be padded to a common length.
Variants§
None
Do not pad. Sequences keep their natural length.
Fixed(usize)
Pad every sequence to a fixed length. Sequences already at least this long are left unchanged (truncation is controlled separately).
Longest
Pad every sequence in a batch to the length of the longest sequence.
Behaves like Padding::None for a single
encode_with call.
Trait Implementations§
impl Copy for Padding
impl Eq for Padding
impl StructuralPartialEq for Padding
Auto Trait Implementations§
impl Freeze for Padding
impl RefUnwindSafe for Padding
impl Send for Padding
impl Sync for Padding
impl Unpin for Padding
impl UnsafeUnpin for Padding
impl UnwindSafe for Padding
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