pub struct BboxBook {
pub tags: Vec<i64>,
pub otsl: Vec<i64>,
pub hiddens: Vec<f32>,
pub n: usize,
pub merge: HashMap<usize, i64>,
/* private fields */
}Expand description
The autoregressive loop’s per-step state, mirroring docling’s predict
bookkeeping (tag_H_buf / bboxes_to_merge): which decoder hidden states
feed the bbox decoder and how horizontal spans merge. Both the native and
browser loops step the decoder themselves (sync vs async ort) and feed
each result through step; everything else stays here so the
two paths can’t drift.
Fields§
The decoder input prefix ([START], then every emitted tag).
otsl: Vec<i64>The emitted OTSL structure tokens (no START/END).
Per-bbox-cell decoder hidden states, flattened [n, EMBED_DIM].
n: usizeNumber of hidden states collected (hiddens.len() / EMBED_DIM).
merge: HashMap<usize, i64>Span merges: cur_bbox_ind → partner (-1 → the last box).
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BboxBook
impl RefUnwindSafe for BboxBook
impl Send for BboxBook
impl Sync for BboxBook
impl Unpin for BboxBook
impl UnsafeUnpin for BboxBook
impl UnwindSafe for BboxBook
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().