Skip to main content

Pipeline

Struct Pipeline 

Source
pub struct Pipeline { /* private fields */ }
Expand description

A reusable PDF pipeline. The primary worker runs its models on every core, so a single-page / small / image / METS input is converted at full intra-op speed with no pool to load. A document with enough pages instead fans out across a pool of narrower workers processed concurrently. Both load lazily and are cached for reuse, so a one-shot conversion only pays for what it uses.

Implementations§

Source§

impl Pipeline

Source

pub fn decode_picture(&self, bytes: &[u8]) -> Result<RgbImage, PdfError>

Decode an embedded picture’s bytes (PNG/JPEG/GIF/BMP/TIFF/WebP) under the standalone-image pixel cap (DOCLING_RS_MAX_IMAGE_PIXELS, 30000 per side) — a crafted header never allocates a multi-GB bitmap.

Source

pub fn classify_picture(&mut self, img: &RgbImage) -> Option<Vec<PictureClass>>

The DocumentFigureClassifier’s predictions for a picture (descending confidence), loading the model on first use. None when the model is not installed (warned once by the loader) or inference failed — the caller decides what an unclassifiable picture means (the picture-OCR class filter lets it through).

Source

pub fn ocr_picture( &mut self, img: &RgbImage, ) -> Result<Option<PictureText>, PdfError>

OCR a picture: Ok(None) when the engine read no text (or could not load — the recognizer’s one-time warning says so, and skip_ocr short-circuits without one), Err only for a failed inference.

Source§

impl Pipeline

Source

pub fn box_out( &mut self, bytes: &[u8], has_pii: &dyn Fn(&str) -> bool, ) -> Result<Option<Vec<u8>>, PdfError>

Box out the lines of bytes (an embedded PNG/JPEG/…) for which has_pii says so. Ok(None) when no line matched — the image is kept as it is; Ok(Some(png)) the repainted image as PNG bytes; Err when the OCR could not run (no recognizer: the caller degrades to dropping the image).

Source§

impl Pipeline

Source

pub fn new() -> Result<Self, PdfError>

Construct the pipeline. Models load lazily on first use (full-intra primary for serial inputs, the helper pool for multi-page PDFs), so nothing is loaded that a given document doesn’t need.

Source

pub fn document_timeout(self, timeout: Option<Duration>) -> Self

A wall-clock budget for each document (docling’s PipelineOptions.document_timeout, #497; None = unlimited, the default). The budget starts when a conversion starts and is checked cooperatively between pages: once it is spent, no further page is rendered or processed, the pages already finished are assembled into the document, and the outcome says so (Completion::TimedOut, which the converter reports as PartialSuccess with a timeout error, the way docling does). A page in flight finishes — the check costs nothing inside a page, and a single-page document (an image) is never cut. For a long-lived pipeline use set_document_timeout before each conversion.

Source

pub fn set_document_timeout(&mut self, timeout: Option<Duration>)

In-place variant of document_timeout for a warm pipeline — set it before every conversion so no request inherits a previous one’s budget.

Source

pub fn set_cancel(&mut self, cancel: Option<CancelToken>)

Cooperative cancellation of the next conversions (#1260): once the token is cancelled, the running conversion stops at its next page boundary and fails with PdfError::Cancelled. None (the default) = never cancelled. A warm pipeline sets it before every conversion, like the budget, so no request inherits another’s token.

Source

pub fn heading_hierarchy(self, opts: HeadingHierarchyOptions) -> Self

Infer section-header levels after assembly (#302, docling’s HeadingHierarchyModel): PDF bookmarks > legal/outline numbering > font style, off by default — see HeadingHierarchyOptions. Pure post-processing configuration; for a warm pipeline use set_heading_hierarchy.

Source

pub fn set_heading_hierarchy(&mut self, opts: HeadingHierarchyOptions)

In-place variant of heading_hierarchy for a long-lived pipeline (docling-serve’s warm instance) — like set_pages, set it before every conversion so no request inherits a previous one’s choice.

Source

pub fn script_positions(self, enable: bool) -> Self

Mark superscript and subscript text — docling’s script_position_options.enabled (docling#4815, #1005). Characters drawn smaller than their line and raised or lowered against it (footnote markers, 1st, mc², H₂O) become runs with formatting.script: a paragraph or footnote holding them keeps its place, and its text moves into an inline group of the runs in the JSON (HTML <sup>/<sub>, DocLang <superscript>/<subscript>); Markdown joins the runs as docling does (E = mc2 in 1905., where the plain text layer reads E = mc 2 in 1905.). Headings, captions, tables, code, formulas, list items, OCR’d and invisible text are left alone. Off by default: the output is unchanged.

Source

pub fn set_script_positions(&mut self, enable: bool)

In-place variant of script_positions.

Source

pub fn set_progress(&mut self, cb: Option<PageProgressHook>)

Install (or clear) the per-page progress hook: called with a PageProgress after each page completes, on every conversion entry point (convert, the streaming variants, convert_image, process_pages). Shared with the parallel workers, so the callback must be cheap and thread-safe. A page the budget cut off is never reported here — the walk’s Completion says how many were; the converter reports those as failed pages (#783).

Source

pub fn pages(self, range: Option<(usize, usize)>) -> Self

Convert only pages first..=last (1-based, like the page numbers a PDF viewer shows — issue #80’s --pages A-B). Out-of-range pages are skipped before rasterization, so the cost is proportional to the window, not the document. last past the end of the document clamps; a window that selects no pages at all (first beyond the last page) is an error at convert time. None (the default) converts everything.

Source

pub fn set_pages(&mut self, range: Option<(usize, usize)>)

In-place variant of pages for a long-lived pipeline (e.g. docling-serve’s warm instance) that applies a per-request window without rebuilding — unlike the model switches, the window is pure configuration. Set it before every conversion; it stays until changed.

Source

pub fn ocr_lang(self, lang: Option<OcrLang>) -> Self

OCR recognition language (see OcrLang): English by default, ch for the multilingual docling-conformance model. None keeps the process default (DOCLING_RS_OCR_LANG, else English). Set before the first conversion; for a warm pipeline use set_ocr_lang.

Source

pub fn set_ocr_lang(&mut self, lang: Option<OcrLang>)

In-place variant of ocr_lang for a long-lived pipeline (docling-serve’s warm instance). Unlike the page window this is a model switch: any worker whose cached recognition model was loaded for a different language drops it, to be lazily reloaded on the next OCR-needing page (cheap — the rec models are ~10 MB).

Source

pub fn ocr_engine(self, engine: Option<OcrEngine>) -> Self

Which OCR engine recognizes text (#460, see OcrEngine): the built-in PP-OCRv3 recognizer by default, or the system tesseract binary (docling’s TesseractCliOcrOptions) — same layout-region crops, same cells; Tesseract does its own line/word segmentation and reads orientation from its OSD. None keeps the process default (DOCLING_RS_OCR_ENGINE, else PP-OCR). Set before the first conversion; for a warm pipeline use set_ocr_engine.

Source

pub fn set_ocr_engine(&mut self, engine: Option<OcrEngine>)

In-place variant of ocr_engine: a model switch like set_ocr_lang — workers holding the other engine drop it, to be lazily reloaded.

Source

pub fn take_ocr_status(&mut self) -> Option<OcrStatus>

What the OCR requests of the conversions since the last call met (#1210), and clear it: None when nothing asked for OCR (a digital PDF, skip_ocr, no_ocr), OcrStatus::Available when the engine read every request, OcrStatus::Unavailable — with the load error — when one went without it because the engine could not load (the #244 degradation: the conversion succeeds, the text OCR would have read is missing). A caller reads it after each conversion; a warm pipeline’s caller also once before, to drop what an earlier conversion that failed half-way left behind.

Source

pub fn tesseract_lang(self, lang: Option<String>) -> Self

Tesseract’s languages (#460): the -l argument, tessdata stems joined with + — build it from an ocr_lang value with tesseract_lang_arg, which also maps BCP-47 tags and the PP-OCR codes. None runs Tesseract’s default (eng). Ignored under the PP-OCR engine, whose language is ocr_lang. For a warm pipeline use set_tesseract_lang.

Source

pub fn set_tesseract_lang(&mut self, lang: Option<String>)

In-place variant of tesseract_lang: a model switch like set_ocr_lang — a worker whose Tesseract was probed for other languages drops it.

Source

pub fn enrichments(self, opts: EnrichmentOptions) -> Self

Enable the opt-in enrichment passes (docling’s do_picture_classification / do_code_enrichment / do_formula_enrichment). Each enabled pass lazily loads its model on the first matching region; a missing model warns once and is skipped. Set before the first conversion (no effect on already-loaded workers).

Source

pub fn no_table_former(self, disable: bool) -> Self

Skip table structure — docling’s do_table_structure=False (--no-tables). Layout still runs. docling 2.150 still emits an empty table for that region (text="", no cells). This port drops it after OCR and keeps the words as text items, each with its own box. The geometric grid is the other case, when TableFormer was requested and its model files are missing. No effect if a worker is already loaded; set this before the first conversion.

Source

pub fn no_text_panels(self, disable: bool) -> Self

Keep every detected picture region as a picture. By default an uncaptioned picture that reads like a dense, uniform text panel (a terms-and-conditions box exported as an image) is demoted into paragraphs (#157); a chart the layout mislabels can still trip that heuristic on scanned pages, and image-extraction workflows may simply want every crop — this flag disables the demotion entirely (#173). No effect on already-loaded workers; set before the first conversion.

Source

pub fn no_ocr(self, disable: bool) -> Self

Skip layout detection, OCR, and TableFormer entirely — no model load, no inference of any kind. The PDF’s embedded text cells are grouped by line and emitted as plain paragraphs in reading order: no headings, lists, tables, code blocks, or pictures, since that structure comes from the layout model. The fastest possible PDF path, but pages with no embedded text layer (scanned/image-only PDFs) yield no text at all — convert those without this flag. Implies no_table_former. A PDF conversion reads the flag per call (its pages never touch a worker); image and METS pages read the flag the workers were loaded with, so set it before the first conversion for those.

Source

pub fn text_layer_auto(self, enable: bool) -> Self

Decide per document between the two: a PDF whose embedded text layer carries its text converts as under no_ocr — the text layer alone, flat paragraphs, no model loaded, no inference — and one without a usable layer (scanned / image-only, or a vestigial layer of a few typed-in form fields; text_layer_has_text) runs the full pipeline, which OCRs its pages. The verdict is the document’s, not a page’s: a digital file with a few scanned pages inserted keeps the text path, and those pages come back empty as under no_ocr. no_ocr wins when both are set; forcing (force_full_page_ocr, ocr_mode) is read only on the pipeline side of the verdict, as under no_ocr. A per-conversion setting: the workers and their models are untouched, so a warm pipeline serving digital and scanned documents in turn reloads nothing.

Source

pub fn set_text_layer_auto(&mut self, enable: bool)

Set text_layer_auto on a built pipeline.

Source

pub fn skip_ocr(self, disable: bool) -> Self

Never run OCR, but keep layout detection and TableFormer — docling’s independent do_ocr=False (#244), the counterpart of no_table_former. Unlike no_ocr (which skips the whole ML stack), structured output — headings, tables, pictures, reading order — is preserved; only text that exists solely as pixels is lost: scanned pages come back with their regions empty, and the speculative OCR of large embedded images never runs. The OCR model is never loaded. Ignored when no_ocr is set (there is no OCR to skip); takes precedence over force_full_page_ocr, mirroring docling where forcing is a sub-option of do_ocr.

Source

pub fn force_full_page_ocr(self, force: bool) -> Self

OCR every page from its rendered image even when the page carries an embedded text layer — docling’s force_full_page_ocr. The escape hatch for text layers that exist but lie: broken encodings, subset fonts with garbage mappings, a scanned form with a few typed-in fields. Ignored when no_ocr is set, mirroring docling (there force_full_page_ocr is a sub-option of do_ocr).

Source

pub fn ocr_mode(self, mode: Option<OcrMode>) -> Self

Which document regions feed the OCR — docling’s OcrMode (#254). The default (default = pdf_aware_layout_regions) is the standard text-layer-aware behavior; full_page/layout_regions discard the text layer like force_full_page_ocr (see ocr::OcrMode for why both map onto it). Whichever of the flag and the mode demands forcing wins, mirroring docling’s force_full_page_ocr → mode=full_page bridge. None keeps the process default (DOCLING_RS_OCR_MODE, else default).

Source

pub fn set_force_full_page_ocr(&mut self, force: bool)

In-place variants of force_full_page_ocr, ocr_mode and ocr_scale for a long-lived pipeline (docling-serve’s warm instance): all three are pure per-worker configuration — no model reloads — so they apply per request like set_pages. Set them before every conversion so no request inherits a previous one’s choice.

Source

pub fn replace_broken_text_layer(self, replace: bool) -> Self

Replace a broken PDF text layer with OCR, page by page — docling’s replace_broken_text_layer (docling#4654, #1006). A page whose text layer quality::is_broken_text_layer judges broken — control, U+FFFD or private-use characters on the page or in many of its lines, Latin letters that stand for another script, too few vowels — is read with full-page OCR, its parse_score set to 0; every other page, and a page without a text layer, keeps the usual behavior. A low parse_score alone never replaces a page. Off by default; ignored under no_ocr / skip_ocr (a sub-option of docling’s do_ocr) and moot under force_full_page_ocr. Pure per-worker configuration, like the forcing flag.

Source

pub fn set_replace_broken_text_layer(&mut self, replace: bool)

In-place variant of replace_broken_text_layer.

Source

pub fn picture_ocr(self, enable: bool) -> Self

Read the text inside the pictures of a page that has a text layer (#1219) — the PDF side of do_picture_ocr. By default such a page OCRs only the bare pictures that cover ≥ 5 % of it (docling’s bitmap_area_threshold) and keeps their lines only when the picture demotes to a text panel; a seal, a stamp or a photo’s rating label keeps no text at all. With this on, every picture that stays a picture is OCR’d on its own crop, with the text detector’s line boxes when ocr_det.onnx is installed, and its lines land on it as docling’s description annotation (provenance = the OCR engine), where the picture OCR of the other formats puts them — Markdown prints it under the caption, JSON writes meta.description. Docling instead nests the OCR cells under the picture as children, which Markdown prints only with traverse_pictures; the annotation keeps one shape for every format. Scanned pages are unchanged — the page OCR reads their pictures already. Off by default: same output, same time. Ignored under no_ocr / skip_ocr.

Source

pub fn set_picture_ocr(&mut self, enable: bool)

In-place variant of picture_ocr.

Source

pub fn set_ocr_mode(&mut self, mode: Option<OcrMode>)

Source

pub fn set_word_gap(&mut self, gap: Option<WordGap>)

How the text layer splits words where the PDF draws no space glyph (#921): docling-parse ≥ 7’s line-local WordGap::Adaptive threshold (the default), a fixed WordGap::Factor of the two flanking glyphs’ mean advance, or WordGap::Legacy (docling-parse ≤ 6’s running-mean rule). None keeps DOCLING_RS_PDF_WORD_GAP, else the default.

Source

pub fn set_ocr_scale(&mut self, scale: Option<f32>)

Source

pub fn picture_ocr_scale(self, scale: Option<f32>) -> Self

Resolution of the picture-OCR enrichment (#645) in pixels per picture pixel, before RapidOCR’s 2000 px longer-side cap (#666) — RapidOCR reads a picture at its native pixels (1.0) and only shrinks what exceeds 2000 px. None (default: DOCLING_RS_PICTURE_OCR_SCALE, else unset) keeps the image-input rule pictures shared with scanned images: ocr_scale when set, else 3 px/pt shrunk to the 2000 px cap — which upscales a 720 × 180 screenshot to 2000 × 500. Pages and image inputs are unaffected. Non-positive values are ignored.

Source

pub fn set_picture_ocr_scale(&mut self, scale: Option<f32>)

In-place picture_ocr_scale for a warm pipeline.

Source

pub fn ocr_textline_orientation(self, enable: bool) -> Self

RapidOCR’s handling of text-line orientation (#666), off by default (DOCLING_RS_OCR_TEXTLINE_ORIENTATION sets the process default): each detected line is cropped along the detector’s rotated rectangle (a perspective warp, get_rotate_crop_image) instead of its axis-aligned box, a crop at least 1.5× taller than wide is turned 90° counter-clockwise, and the PP-LCNet text-line orientation classifier (.models/ocr_textline_ori.onnx, DOCLING_OCR_TEXTLINE_ORI_ONNX) turns lines it reads as upside down (180 above 0.9). Vertical axis titles, rotated headers, skewed and upside-down lines then read as text. Applies to every PP-OCR line read off the detector — pages and pictures alike — but not to table words or the projection fallback; the reported boxes stay axis-aligned. A missing classifier warns once and keeps the crop and the 90° turn. Tesseract orients on its own.

Source

pub fn set_ocr_textline_orientation(&mut self, enable: Option<bool>)

In-place ocr_textline_orientation for a warm pipeline (serve, the bindings’ Pipeline), applied to loaded workers too; None restores the process default (DOCLING_RS_OCR_TEXTLINE_ORIENTATION), like set_ocr_scale.

Source

pub fn images_scale(self, scale: Option<f32>) -> Self

Pixels per PDF point for picture crops and page images — docling’s images_scale (#519/#520). None (the default) delivers crops at the pipeline’s own page render, 2.0 px/pt (144 dpi), untouched. Another value resamples that render (CatmullRom, docling’s PIL BICUBIC), so values above 2.0 upsample rather than re-render. Each picture’s dpi (docling-core’s ImageRef.dpi) is 72·scale, so consumers mapping pixels back to points stay exact. Layout, OCR and TableFormer inputs are unaffected. Non-positive values are ignored.

Source

pub fn generate_page_images(self, enabled: bool) -> Self

Keep each page’s render as the document’s page image — docling’s generate_page_images (#520): the JSON export writes it as the page’s image (docling-core’s PageItem.image, at Self::images_scale, dpi = 72·scale), which is what docling-core’s TableItem.get_image / FormulaItem.get_image crop from. Off by default: a page image is a full-page PNG per page held in memory. Pages converted with no_ocr (text layer only) are never rendered and get none; streaming conversions carry no page map and drop them.

Source

pub fn use_embedded_picture_images(self, enabled: bool) -> Self

Use a picture’s embedded image instead of the render crop when its region holds exactly one image XObject with nothing painted over it — docling’s use_embedded_picture_images (#1007, docling#5143). The bitmap keeps its native pixel size and the picture’s dpi is 72; a masked, transparent, clipped, rotated or overlapped image, a second image or text in the box, a /Rotated page or an image that does not decode keep the crop. Off by default; layout, OCR and page images are unaffected.

Source

pub fn set_images(&mut self, images: ImageOutput)

Both image outputs at once, also on already-loaded workers — the per-request form a warm pipeline (serve, the Node Pipeline) uses, like set_ocr_scale. A non-finite or non-positive scale reads as unset.

Source

pub fn ocr_scale(self, scale: Option<f32>) -> Self

OCR render scale in pixels per PDF point — docling’s OcrOptions.scale (#254, upstream docling#3877; their default 3 = 216 dpi). None (default: DOCLING_RS_OCR_SCALE, else unset) feeds the recognizer the pipeline’s own page render (2.0 px/pt = 144 dpi) for a rendered page, and for a standalone image input docling’s own resolution (#570): 3 px/pt shrunk so the longer side stays within RapidOCR’s 2000 px — what its models see after RapidOCR’s max_side_len pass (a 754 × 1000 scan reads at 2.0). A set value resamples the render / image for the OCR input only — layout and TableFormer keep their pinned-resolution pixels, so the conformance baseline never moves. Lower it when the source raster is already high-resolution and upscaling degrades recognition; raise it toward docling’s 216 dpi for parity experiments. Non-positive values are ignored.

Source

pub fn set_keep_typography(&mut self, keep: Option<bool>)

Keep typographic punctuation as drawn — „ “ ‚ ‘, dashes, … — instead of folding it to ASCII as docling-parse’s sanitizer does (pdf_keep_typography, #921). None keeps DOCLING_RS_PDF_KEEP_TYPOGRAPHY, else folding.

Source

pub fn keep_typography(self, keep: Option<bool>) -> Self

Source

pub fn word_gap(self, gap: Option<WordGap>) -> Self

Source

pub fn warm_up(&mut self) -> Result<(), PdfError>

Eagerly load the models (the full-intra serial worker: layout + OCR, and the shared TableFormer unless disabled) so the first conversion doesn’t pay the load cost. Idempotent; respects no_ocr / no_table_former (with no_ocr there is nothing to load). The docling.rs analogue of docling’s DocumentConverter.initialize_pipeline.

Source

pub fn warm_up_all(&mut self) -> Result<(), PdfError>

warm_up plus the parallel page-worker pool, so the first multi-page conversion is no slower than later ones either: a document of DOCLING_RS_PDF_PARALLEL_MIN pages (6) or more fans out across the pool, whose workers each load their own layout/OCR sessions on first use (#548 — docling-serve’s --warmup left a 9-page PDF paying that load). Costs the pool’s memory up front (~0.4 GB a worker); with a pool of one worker it is exactly warm_up.

Source

pub fn convert( &mut self, bytes: &[u8], password: Option<&str>, name: &str, ) -> Result<DoclingDocument, PdfError>

Convert a PDF (bytes) to a DoclingDocument. A document with fewer than parallel_min pages (or a pool size of 1) streams through the full-intra primary; a larger one renders on this thread (pdfium is not thread-safe) and fans the pages out across the worker pool, reassembled in page order so the output is byte-identical to the serial path.

Source

pub fn convert_outcome( &mut self, bytes: &[u8], password: Option<&str>, name: &str, ) -> Result<Converted, PdfError>

convert that also says how the conversion ended — whether the document_timeout cut it short and how many pages made it (Completion).

Source

pub fn convert_streaming<F>( &mut self, bytes: &[u8], password: Option<&str>, name: &str, emit: F, ) -> Result<(), PdfError>
where F: FnMut(Vec<Node>, Vec<(String, String)>) -> Result<(), PdfError>,

Convert a PDF in streaming mode: emit is called with each finalized, in-document-order batch of nodes (and that span’s recovered links) as pages complete, so a caller can serialize Markdown page by page instead of waiting for the whole document. The batches are exactly the buffered convert’s nodes, split at safe block boundaries by [assemble::StreamAssembler] — the parallel path reorders pages back into document order before emitting, so the output is identical regardless of worker scheduling.

emit runs on the calling thread (never a worker), so it needn’t be Send and its backpressure throttles the whole pipeline. Returning Err from emit aborts the conversion with that error.

Source

pub fn convert_streaming_outcome<F>( &mut self, bytes: &[u8], password: Option<&str>, name: &str, emit: F, ) -> Result<Completion, PdfError>
where F: FnMut(Vec<Node>, Vec<(String, String)>) -> Result<(), PdfError>,

convert_streaming that also says how the conversion ended (Completion): a spent document_timeout stops the walk, the pages finished so far are emitted (the tail included) and the outcome is TimedOut — never an error.

Source

pub fn convert_image( &mut self, bytes: &[u8], name: &str, ) -> Result<DoclingDocument, PdfError>

Convert a standalone image (PNG/JPEG/TIFF/WebP/…) as a single page — docling routes images through the same layout+OCR pipeline as a PDF page.

Source

pub fn process_pages( &mut self, pages: Vec<PdfPage>, name: &str, ) -> Result<DoclingDocument, PdfError>

Run layout (+ OCR for cell-less pages) and assemble each already-rendered page (image / METS inputs, which are small and already materialised). Public so mets::convert_mets_gbs_with_pipeline can drive a caller-configured pipeline (#244).

Source

pub fn process_numbered_pages( &mut self, pages: Vec<(usize, PdfPage)>, name: &str, ) -> Result<DoclingDocument, PdfError>

Pipeline::process_pages with each page’s 1-based number given — a METS archive that left a page out keeps the numbers of the pages after it (#1147).

Auto Trait Implementations§

§

impl !RefUnwindSafe for Pipeline

§

impl !UnwindSafe for Pipeline

§

impl Forget for Pipeline

§

impl Freeze for Pipeline
where *const ArcInner<SharedSessionInner> is !null: Freeze, PhantomData<ArcInner<SharedSessionInner>>: Freeze, *const u8 is !null: Freeze, PhantomData<Outlet>: Freeze, PhantomData<u8>: Freeze, PhantomData<Session>: Freeze, PhantomData<String>: Freeze, *const ArcInner<Mutex<DetSlot>> is !null: Freeze, PhantomData<ArcInner<Mutex<DetSlot>>>: Freeze, *const LeafNode<usize, Result<Vec<DetBox>, String>> is !null: Freeze, PhantomData<(Owned, LeafOrInternal)>: Freeze, PhantomData<Box<(usize, Result<Vec<DetBox>, String>)>>: Freeze, *const ArcInner<Mutex<TfSlot>> is !null: Freeze, PhantomData<ArcInner<Mutex<TfSlot>>>: Freeze, *const ArcInner<Mutex<EnrichSlot<PictureClassifier>>> is !null: Freeze, PhantomData<ArcInner<Mutex<EnrichSlot<PictureClassifier>>>>: Freeze, *const ArcInner<Mutex<EnrichSlot<CodeFormula>>> is !null: Freeze, PhantomData<ArcInner<Mutex<EnrichSlot<CodeFormula>>>>: Freeze, PhantomData<Worker>: Freeze, *const LeafNode<String, Vec<String>> is !null: Freeze, PhantomData<Box<(String, Vec<String>)>>: Freeze, *const ArcInner<dyn Fn(PageProgress) + Sync + Send> is !null: Freeze, PhantomData<ArcInner<dyn Fn(PageProgress) + Sync + Send>>: Freeze, *const ArcInner<Atomic<bool>> is !null: Freeze, PhantomData<ArcInner<Atomic<bool>>>: Freeze,

§

impl Move for Pipeline

§

impl Send for Pipeline
where Session: Send, RawVecInner: Send, Arc<Mutex<DetSlot>>: Send, NodeRef<Owned, usize, Result<Vec<DetBox>, String>, LeafOrInternal>: Send, BoxRaw<(usize, Result<Vec<DetBox>, String>)>: Send, Arc<Mutex<TfSlot>>: Send, Arc<Mutex<EnrichSlot<PictureClassifier>>>: Send, Arc<Mutex<EnrichSlot<CodeFormula>>>: Send, NodeRef<Owned, String, Vec<String>, LeafOrInternal>: Send, BoxRaw<(String, Vec<String>)>: Send, Arc<dyn Fn(PageProgress) + Sync + Send>: Send, Arc<Atomic<bool>>: Send,

§

impl Sync for Pipeline
where Session: Sync, RawVecInner: Sync, Arc<Mutex<DetSlot>>: Sync, NodeRef<Owned, usize, Result<Vec<DetBox>, String>, LeafOrInternal>: Sync, BoxRaw<(usize, Result<Vec<DetBox>, String>)>: Sync, Arc<Mutex<TfSlot>>: Sync, Arc<Mutex<EnrichSlot<PictureClassifier>>>: Sync, Arc<Mutex<EnrichSlot<CodeFormula>>>: Sync, NodeRef<Owned, String, Vec<String>, LeafOrInternal>: Sync, BoxRaw<(String, Vec<String>)>: Sync, Arc<dyn Fn(PageProgress) + Sync + Send>: Sync, Arc<Atomic<bool>>: Sync,

§

impl Unpin for Pipeline
where Arc<SharedSessionInner>: Unpin, *const u8 is !null: Unpin, *const i64 is !null: Unpin, i64: Unpin, *const String is !null: Unpin, String: Unpin, Box<ValueType>: Unpin, *const OrtValueInfo is !null: Unpin, Arc<Mutex<DetSlot>>: Unpin, *const LeafNode<usize, Result<Vec<DetBox>, String>> is !null: Unpin, Box<(usize, Result<Vec<DetBox>, String>)>: Unpin, Arc<Mutex<TfSlot>>: Unpin, Arc<Mutex<EnrichSlot<PictureClassifier>>>: Unpin, Arc<Mutex<EnrichSlot<CodeFormula>>>: Unpin, *const LeafNode<String, Vec<String>> is !null: Unpin, Box<(String, Vec<String>)>: Unpin, Arc<dyn Fn(PageProgress) + Sync + Send>: Unpin, Arc<Atomic<bool>>: Unpin,

§

impl UnsafeUnpin for Pipeline
where *const ArcInner<SharedSessionInner> is !null: UnsafeUnpin, PhantomData<ArcInner<SharedSessionInner>>: UnsafeUnpin, *const u8 is !null: UnsafeUnpin, PhantomData<Outlet>: UnsafeUnpin, PhantomData<u8>: UnsafeUnpin, PhantomData<Session>: UnsafeUnpin, PhantomData<String>: UnsafeUnpin, *const ArcInner<Mutex<DetSlot>> is !null: UnsafeUnpin, PhantomData<ArcInner<Mutex<DetSlot>>>: UnsafeUnpin, *const LeafNode<usize, Result<Vec<DetBox>, String>> is !null: UnsafeUnpin, PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin, PhantomData<Box<(usize, Result<Vec<DetBox>, String>)>>: UnsafeUnpin, *const ArcInner<Mutex<TfSlot>> is !null: UnsafeUnpin, PhantomData<ArcInner<Mutex<TfSlot>>>: UnsafeUnpin, *const ArcInner<Mutex<EnrichSlot<PictureClassifier>>> is !null: UnsafeUnpin, PhantomData<ArcInner<Mutex<EnrichSlot<PictureClassifier>>>>: UnsafeUnpin, *const ArcInner<Mutex<EnrichSlot<CodeFormula>>> is !null: UnsafeUnpin, PhantomData<ArcInner<Mutex<EnrichSlot<CodeFormula>>>>: UnsafeUnpin, PhantomData<Worker>: UnsafeUnpin, *const LeafNode<String, Vec<String>> is !null: UnsafeUnpin, PhantomData<Box<(String, Vec<String>)>>: UnsafeUnpin, *const ArcInner<dyn Fn(PageProgress) + Sync + Send> is !null: UnsafeUnpin, PhantomData<ArcInner<dyn Fn(PageProgress) + Sync + Send>>: UnsafeUnpin, *const ArcInner<Atomic<bool>> is !null: UnsafeUnpin, PhantomData<ArcInner<Atomic<bool>>>: UnsafeUnpin,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

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 more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, S> SimdFrom<T, S> for T
where S: Simd,

Source§

fn simd_from(_simd: S, value: T) -> T

Source§

impl<F, T, S> SimdInto<T, S> for F
where T: SimdFrom<F, S>, S: Simd,

Source§

fn simd_into(self, simd: S) -> T

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V