pub unsafe trait VNRequestProgressProviding: NSObjectProtocol {
// Provided methods
unsafe fn progressHandler(&self) -> VNRequestProgressHandler
where Self: Sized + Message { ... }
unsafe fn setProgressHandler(
&self,
progress_handler: VNRequestProgressHandler,
)
where Self: Sized + Message { ... }
unsafe fn indeterminate(&self) -> bool
where Self: Sized + Message { ... }
}
VNRequest
only.Expand description
Provided Methods§
Sourceunsafe fn progressHandler(&self) -> VNRequestProgressHandler
Available on crate feature block2
only.
unsafe fn progressHandler(&self) -> VNRequestProgressHandler
block2
only.Requests that support the VNRequestProgressProviding protocol would periodically call the progressHandler to report progress on longer running tasks.
The progessHandler is optional allowing clients of the request to report progress to the user and/or display or process partial results when they become available. Note that the progressHandler can be called on a different dispatch queue than what the request was initiated from.
Sourceunsafe fn setProgressHandler(&self, progress_handler: VNRequestProgressHandler)
Available on crate feature block2
only.
unsafe fn setProgressHandler(&self, progress_handler: VNRequestProgressHandler)
block2
only.Setter for progressHandler
.
Sourceunsafe fn indeterminate(&self) -> bool
unsafe fn indeterminate(&self) -> bool
If a request cannot determine its progress in fractions completed, this property will be set.
If this is set, it doesn’t mean that the request will run forever just that the nature of the request is not broken down into identifiable fractions on which progress can be reported in increments. The progressHandler will nonetheless be called at suitable intervals.
Trait Implementations§
Source§impl ProtocolType for dyn VNRequestProgressProviding
impl ProtocolType for dyn VNRequestProgressProviding
impl<T> ImplementedBy<T> for dyn VNRequestProgressProviding
Implementations on Foreign Types§
impl<T> VNRequestProgressProviding for ProtocolObject<T>where
T: ?Sized + VNRequestProgressProviding,
Implementors§
impl VNRequestProgressProviding for VNRecognizeTextRequest
VNRecognizeTextRequest
only.