Skip to main content

WKDownloadDelegate

Trait WKDownloadDelegate 

Source
pub unsafe trait WKDownloadDelegate: NSObjectProtocol + MainThreadOnly {
    // Provided methods
    unsafe fn download_decideDestinationUsingResponse_suggestedFilename_completionHandler(
        &self,
        download: &WKDownload,
        response: &NSURLResponse,
        suggested_filename: &NSString,
        completion_handler: &DynBlock<dyn Fn(*mut NSURL)>,
    )
       where Self: Sized + Message { ... }
    unsafe fn download_willPerformHTTPRedirection_newRequest_decisionHandler(
        &self,
        download: &WKDownload,
        response: &NSHTTPURLResponse,
        request: &NSURLRequest,
        decision_handler: &DynBlock<dyn Fn(WKDownloadRedirectPolicy)>,
    )
       where Self: Sized + Message { ... }
    unsafe fn download_didReceiveAuthenticationChallenge_completionHandler(
        &self,
        download: &WKDownload,
        challenge: &NSURLAuthenticationChallenge,
        completion_handler: &DynBlock<dyn Fn(NSURLSessionAuthChallengeDisposition, *mut NSURLCredential)>,
    )
       where Self: Sized + Message { ... }
    unsafe fn downloadDidFinish(&self, download: &WKDownload)
       where Self: Sized + Message { ... }
    unsafe fn download_didFailWithError_resumeData(
        &self,
        download: &WKDownload,
        error: &NSError,
        resume_data: Option<&NSData>,
    )
       where Self: Sized + Message { ... }
    unsafe fn download_decidePlaceholderPolicy(
        &self,
        download: &WKDownload,
        completion_handler: &DynBlock<dyn Fn(WKDownloadPlaceholderPolicy, *mut NSURL)>,
    )
       where Self: Sized + Message { ... }
    unsafe fn download_didReceivePlaceholderURL_completionHandler(
        &self,
        download: &WKDownload,
        url: &NSURL,
        completion_handler: &DynBlock<dyn Fn()>,
    )
       where Self: Sized + Message { ... }
    unsafe fn download_didReceiveFinalURL(
        &self,
        download: &WKDownload,
        url: &NSURL,
    )
       where Self: Sized + Message { ... }
}
Available on crate feature WKDownloadDelegate only.
Expand description

Provided Methods§

Source

unsafe fn download_decideDestinationUsingResponse_suggestedFilename_completionHandler( &self, download: &WKDownload, response: &NSURLResponse, suggested_filename: &NSString, completion_handler: &DynBlock<dyn Fn(*mut NSURL)>, )
where Self: Sized + Message,

Available on crate features block2 and WKDownload only.
Source

unsafe fn download_willPerformHTTPRedirection_newRequest_decisionHandler( &self, download: &WKDownload, response: &NSHTTPURLResponse, request: &NSURLRequest, decision_handler: &DynBlock<dyn Fn(WKDownloadRedirectPolicy)>, )
where Self: Sized + Message,

Available on crate features block2 and WKDownload only.
Source

unsafe fn download_didReceiveAuthenticationChallenge_completionHandler( &self, download: &WKDownload, challenge: &NSURLAuthenticationChallenge, completion_handler: &DynBlock<dyn Fn(NSURLSessionAuthChallengeDisposition, *mut NSURLCredential)>, )
where Self: Sized + Message,

Available on crate features block2 and WKDownload only.
Source

unsafe fn downloadDidFinish(&self, download: &WKDownload)
where Self: Sized + Message,

Available on crate feature WKDownload only.
Source

unsafe fn download_didFailWithError_resumeData( &self, download: &WKDownload, error: &NSError, resume_data: Option<&NSData>, )
where Self: Sized + Message,

Available on crate feature WKDownload only.
Source

unsafe fn download_decidePlaceholderPolicy( &self, download: &WKDownload, completion_handler: &DynBlock<dyn Fn(WKDownloadPlaceholderPolicy, *mut NSURL)>, )
where Self: Sized + Message,

Available on crate features block2 and WKDownload only.
Source

unsafe fn download_didReceivePlaceholderURL_completionHandler( &self, download: &WKDownload, url: &NSURL, completion_handler: &DynBlock<dyn Fn()>, )
where Self: Sized + Message,

Available on crate features block2 and WKDownload only.
Source

unsafe fn download_didReceiveFinalURL(&self, download: &WKDownload, url: &NSURL)
where Self: Sized + Message,

Available on crate feature WKDownload only.

Trait Implementations§

Source§

impl<T> ImplementedBy<T> for dyn WKDownloadDelegate

Source§

impl ProtocolType for dyn WKDownloadDelegate

Source§

const NAME: &'static str = "WKDownloadDelegate"

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

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<T> WKDownloadDelegate for ProtocolObject<T>

Implementors§