pub struct Batch<'a> {
pub ids: &'a [u32],
pub cu: &'a [u32],
pub markers: &'a [u32],
pub mcu: &'a [u32],
pub qtype: &'a [u8],
}Expand description
A batch, flattened. Sequence s is tokens cu[s]..cu[s + 1] and markers
mcu[s]..mcu[s + 1], and each marker is a position within its own sequence.
Fields§
§ids: &'a [u32]Token ids of every sequence, end to end.
cu: &'a [u32]Sequence starts in ids, with the total at the end.
markers: &'a [u32]Marker positions of every sequence, end to end.
mcu: &'a [u32]Sequence starts in markers, with the total at the end.
qtype: &'a [u8]The question type of each sequence.
Implementations§
Trait Implementations§
impl<'a> Copy for Batch<'a>
Auto Trait Implementations§
impl<'a> Freeze for Batch<'a>
impl<'a> RefUnwindSafe for Batch<'a>
impl<'a> Send for Batch<'a>
impl<'a> Sync for Batch<'a>
impl<'a> Unpin for Batch<'a>
impl<'a> UnsafeUnpin for Batch<'a>
impl<'a> UnwindSafe for Batch<'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