Skip to main content

visionkit/
lib.rs

1#![doc = include_str!("../README.md")]
2#![cfg_attr(docsrs, feature(doc_cfg))]
3#![allow(
4    clippy::doc_markdown,
5    clippy::missing_const_for_fn,
6    clippy::missing_errors_doc,
7    clippy::module_name_repetitions
8)]
9
10/// Re-exports the core VisionKit analyzer types.
11pub mod analyzer;
12/// Exposes VisionKit barcode-area wrappers.
13pub mod barcode;
14/// Exposes the VisionKit data scanner wrapper.
15pub mod data_scanner_view_controller;
16/// Exposes error types returned by the VisionKit wrappers.
17pub mod error;
18/// Exposes the raw VisionKit bridge layer.
19pub mod ffi;
20/// Exposes the VisionKit image analysis wrapper.
21pub mod image_analysis;
22/// Exposes the VisionKit image analyzer wrapper and configuration types.
23pub mod image_analyzer;
24/// Exposes VisionKit live text and overlay wrappers.
25pub mod live_text_interaction;
26mod private;
27/// Exposes VisionKit recognized-item availability wrappers.
28pub mod recognized_item;
29/// Exposes VisionKit recognized-text availability wrappers.
30pub mod recognized_text;
31/// Exposes VisionKit availability metadata types.
32pub mod support;
33/// Exposes the VisionKit document camera wrapper.
34pub mod vn_document_camera_view_controller;
35
36#[cfg(feature = "async")]
37/// Exposes executor-agnostic async VisionKit wrappers.
38pub mod async_api;
39
40pub use barcode::Barcode;
41pub use data_scanner_view_controller::DataScannerViewController;
42pub use error::{LiveTextSubjectUnavailable, VisionKitError};
43pub use image_analysis::ImageAnalysis;
44pub use image_analyzer::{
45    ImageAnalysisTypes, ImageAnalyzer, ImageAnalyzerConfiguration, ImageOrientation,
46};
47pub use live_text_interaction::{
48    EdgeInsets, LiveTextAttributedText, LiveTextAttributedTextAttribute, LiveTextAttributedTextRun,
49    LiveTextContentView, LiveTextDelegateEvent, LiveTextEventInfo, LiveTextFont, LiveTextImageData,
50    LiveTextInteraction, LiveTextInteractionDelegate, LiveTextInteractionTypes, LiveTextMenu,
51    LiveTextMenuItem, LiveTextMenuTag, LiveTextSubject, LiveTextTextRange,
52    LiveTextTrackingImageView, Point, Rect, Size,
53};
54pub use recognized_item::RecognizedItem;
55pub use recognized_text::RecognizedText;
56pub use support::AreaSupportInfo;
57pub use vn_document_camera_view_controller::VNDocumentCameraViewController;
58
59/// Re-exports the core VisionKit wrappers for convenient imports.
60pub mod prelude {
61    pub use crate::barcode::Barcode;
62    pub use crate::data_scanner_view_controller::DataScannerViewController;
63    pub use crate::error::{LiveTextSubjectUnavailable, VisionKitError};
64    pub use crate::image_analysis::ImageAnalysis;
65    pub use crate::image_analyzer::{
66        ImageAnalysisTypes, ImageAnalyzer, ImageAnalyzerConfiguration, ImageOrientation,
67    };
68    pub use crate::live_text_interaction::{
69        EdgeInsets, LiveTextAttributedText, LiveTextAttributedTextAttribute,
70        LiveTextAttributedTextRun, LiveTextContentView, LiveTextDelegateEvent, LiveTextEventInfo,
71        LiveTextFont, LiveTextImageData, LiveTextInteraction, LiveTextInteractionDelegate,
72        LiveTextInteractionTypes, LiveTextMenu, LiveTextMenuItem, LiveTextMenuTag, LiveTextSubject,
73        LiveTextTextRange, LiveTextTrackingImageView, Point, Rect, Size,
74    };
75    pub use crate::recognized_item::RecognizedItem;
76    pub use crate::recognized_text::RecognizedText;
77    pub use crate::support::AreaSupportInfo;
78    pub use crate::vn_document_camera_view_controller::VNDocumentCameraViewController;
79}