objc2_vision/observation.rs
1#![allow(non_snake_case)]
2use objc2::extern_methods;
3use objc2::rc::Retained;
4use objc2_foundation::{NSError, NSRange};
5
6use crate::{VNRecognizedText, VNRectangleObservation};
7
8impl VNRecognizedText {
9 extern_methods!(
10 /// Calculate the bounding box around the characters in the range of
11 /// the string.
12 ///
13 /// The bounding boxes are not guaranteed to be an exact fit around
14 /// the characters and are purely meant for UI purposes and not for
15 /// image processing.
16 #[unsafe(method(boundingBoxForRange:error:_))]
17 #[unsafe(method_family = none)]
18 pub unsafe fn boundingBoxForRange_error(
19 &self,
20 range: NSRange,
21 ) -> Result<Retained<VNRectangleObservation>, Retained<NSError>>;
22 );
23}