Trait VNRequestProgressProviding

Source
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 { ... }
}
Available on crate feature VNRequest only.
Expand description

Provided Methods§

Source

unsafe fn progressHandler(&self) -> VNRequestProgressHandler
where Self: Sized + Message,

Available on crate feature 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.

Source

unsafe fn setProgressHandler(&self, progress_handler: VNRequestProgressHandler)
where Self: Sized + Message,

Available on crate feature block2 only.

Setter for progressHandler.

Source

unsafe fn indeterminate(&self) -> bool
where Self: Sized + Message,

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

Source§

const NAME: &'static str = "VNRequestProgressProviding"

The name of the Objective-C protocol that this type represents. Read more
Source§

fn protocol() -> Option<&'static AnyProtocol>

Get a reference to the Objective-C protocol object that this type represents. Read more
Source§

impl<T> ImplementedBy<T> for dyn VNRequestProgressProviding

Implementations on Foreign Types§

Source§

impl<T> VNRequestProgressProviding for ProtocolObject<T>

Implementors§

Source§

impl VNRequestProgressProviding for VNRecognizeTextRequest

Available on crate feature VNRecognizeTextRequest only.