pub struct ExtensibleOAROCR { /* private fields */ }Expand description
Integration wrapper that bridges the extensible pipeline with OAROCR.
Implementations§
Source§impl ExtensibleOAROCR
impl ExtensibleOAROCR
Sourcepub fn new(
oarocr_config: OAROCRConfig,
extensible_config: ExtensiblePipelineConfig,
) -> Result<Self, OCRError>
pub fn new( oarocr_config: OAROCRConfig, extensible_config: ExtensiblePipelineConfig, ) -> Result<Self, OCRError>
Create a new extensible OAROCR instance.
Sourcepub fn process_image(
&mut self,
image_path: &Path,
) -> Result<OAROCRResult, OCRError>
pub fn process_image( &mut self, image_path: &Path, ) -> Result<OAROCRResult, OCRError>
Process a single image using the extensible pipeline.
Sourcepub fn extensible_config(&self) -> &ExtensiblePipelineConfig
pub fn extensible_config(&self) -> &ExtensiblePipelineConfig
Get the extensible pipeline configuration.
Sourcepub fn oarocr_config(&self) -> &OAROCRConfig
pub fn oarocr_config(&self) -> &OAROCRConfig
Get the original OAROCR configuration.
Sourcepub fn add_custom_stage<S, C>(
&mut self,
stage: S,
config: Option<C>,
) -> Result<(), OCRError>where
S: PipelineStage<Config = C> + 'static,
C: Send + Sync + Debug + Clone + ConfigValidator + Default + 'static,
pub fn add_custom_stage<S, C>(
&mut self,
stage: S,
config: Option<C>,
) -> Result<(), OCRError>where
S: PipelineStage<Config = C> + 'static,
C: Send + Sync + Debug + Clone + ConfigValidator + Default + 'static,
Add a custom stage to the pipeline.
Auto Trait Implementations§
impl Freeze for ExtensibleOAROCR
impl !RefUnwindSafe for ExtensibleOAROCR
impl Send for ExtensibleOAROCR
impl Sync for ExtensibleOAROCR
impl Unpin for ExtensibleOAROCR
impl !UnwindSafe for ExtensibleOAROCR
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.