Trait objc2_foundation::NSURLSessionTaskDelegate

source ·
pub unsafe trait NSURLSessionTaskDelegate: NSURLSessionDelegate {
    // Provided methods
    unsafe fn URLSession_didCreateTask(
        &self,
        session: &NSURLSession,
        task: &NSURLSessionTask
    )
       where Self: Sized + Message { ... }
    unsafe fn URLSession_task_willBeginDelayedRequest_completionHandler(
        &self,
        session: &NSURLSession,
        task: &NSURLSessionTask,
        request: &NSURLRequest,
        completion_handler: &Block<dyn Fn(NSURLSessionDelayedRequestDisposition, *mut NSURLRequest)>
    )
       where Self: Sized + Message { ... }
    unsafe fn URLSession_taskIsWaitingForConnectivity(
        &self,
        session: &NSURLSession,
        task: &NSURLSessionTask
    )
       where Self: Sized + Message { ... }
    unsafe fn URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler(
        &self,
        session: &NSURLSession,
        task: &NSURLSessionTask,
        response: &NSHTTPURLResponse,
        request: &NSURLRequest,
        completion_handler: &Block<dyn Fn(*mut NSURLRequest)>
    )
       where Self: Sized + Message { ... }
    unsafe fn URLSession_task_didReceiveChallenge_completionHandler(
        &self,
        session: &NSURLSession,
        task: &NSURLSessionTask,
        challenge: &NSURLAuthenticationChallenge,
        completion_handler: &Block<dyn Fn(NSURLSessionAuthChallengeDisposition, *mut NSURLCredential)>
    )
       where Self: Sized + Message { ... }
    unsafe fn URLSession_task_needNewBodyStream(
        &self,
        session: &NSURLSession,
        task: &NSURLSessionTask,
        completion_handler: &Block<dyn Fn(*mut NSInputStream)>
    )
       where Self: Sized + Message { ... }
    unsafe fn URLSession_task_needNewBodyStreamFromOffset_completionHandler(
        &self,
        session: &NSURLSession,
        task: &NSURLSessionTask,
        offset: i64,
        completion_handler: &Block<dyn Fn(*mut NSInputStream)>
    )
       where Self: Sized + Message { ... }
    unsafe fn URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend(
        &self,
        session: &NSURLSession,
        task: &NSURLSessionTask,
        bytes_sent: i64,
        total_bytes_sent: i64,
        total_bytes_expected_to_send: i64
    )
       where Self: Sized + Message { ... }
    unsafe fn URLSession_task_didReceiveInformationalResponse(
        &self,
        session: &NSURLSession,
        task: &NSURLSessionTask,
        response: &NSHTTPURLResponse
    )
       where Self: Sized + Message { ... }
    unsafe fn URLSession_task_didFinishCollectingMetrics(
        &self,
        session: &NSURLSession,
        task: &NSURLSessionTask,
        metrics: &NSURLSessionTaskMetrics
    )
       where Self: Sized + Message { ... }
    unsafe fn URLSession_task_didCompleteWithError(
        &self,
        session: &NSURLSession,
        task: &NSURLSessionTask,
        error: Option<&NSError>
    )
       where Self: Sized + Message { ... }
}
Available on crate feature NSURLSession only.

Provided Methods§

source

unsafe fn URLSession_didCreateTask( &self, session: &NSURLSession, task: &NSURLSessionTask )
where Self: Sized + Message,

source

unsafe fn URLSession_task_willBeginDelayedRequest_completionHandler( &self, session: &NSURLSession, task: &NSURLSessionTask, request: &NSURLRequest, completion_handler: &Block<dyn Fn(NSURLSessionDelayedRequestDisposition, *mut NSURLRequest)> )
where Self: Sized + Message,

Available on crate features NSURLRequest and block2 only.
source

unsafe fn URLSession_taskIsWaitingForConnectivity( &self, session: &NSURLSession, task: &NSURLSessionTask )
where Self: Sized + Message,

source

unsafe fn URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler( &self, session: &NSURLSession, task: &NSURLSessionTask, response: &NSHTTPURLResponse, request: &NSURLRequest, completion_handler: &Block<dyn Fn(*mut NSURLRequest)> )
where Self: Sized + Message,

Available on crate features NSURLRequest and NSURLResponse and block2 only.
source

unsafe fn URLSession_task_didReceiveChallenge_completionHandler( &self, session: &NSURLSession, task: &NSURLSessionTask, challenge: &NSURLAuthenticationChallenge, completion_handler: &Block<dyn Fn(NSURLSessionAuthChallengeDisposition, *mut NSURLCredential)> )
where Self: Sized + Message,

Available on crate features NSURLAuthenticationChallenge and NSURLCredential and block2 only.
source

unsafe fn URLSession_task_needNewBodyStream( &self, session: &NSURLSession, task: &NSURLSessionTask, completion_handler: &Block<dyn Fn(*mut NSInputStream)> )
where Self: Sized + Message,

Available on crate features NSStream and block2 only.
source

unsafe fn URLSession_task_needNewBodyStreamFromOffset_completionHandler( &self, session: &NSURLSession, task: &NSURLSessionTask, offset: i64, completion_handler: &Block<dyn Fn(*mut NSInputStream)> )
where Self: Sized + Message,

Available on crate features NSStream and block2 only.
source

unsafe fn URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend( &self, session: &NSURLSession, task: &NSURLSessionTask, bytes_sent: i64, total_bytes_sent: i64, total_bytes_expected_to_send: i64 )
where Self: Sized + Message,

source

unsafe fn URLSession_task_didReceiveInformationalResponse( &self, session: &NSURLSession, task: &NSURLSessionTask, response: &NSHTTPURLResponse )
where Self: Sized + Message,

Available on crate feature NSURLResponse only.
source

unsafe fn URLSession_task_didFinishCollectingMetrics( &self, session: &NSURLSession, task: &NSURLSessionTask, metrics: &NSURLSessionTaskMetrics )
where Self: Sized + Message,

source

unsafe fn URLSession_task_didCompleteWithError( &self, session: &NSURLSession, task: &NSURLSessionTask, error: Option<&NSError> )
where Self: Sized + Message,

Available on crate feature NSError only.

Trait Implementations§

source§

impl ProtocolType for dyn NSURLSessionTaskDelegate

source§

const NAME: &'static str = "NSURLSessionTaskDelegate"

The name of the Objective-C protocol that this type represents.
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 NSURLSessionTaskDelegate

Implementations on Foreign Types§

source§

impl<T> NSURLSessionTaskDelegate for ProtocolObject<T>

Implementors§