net_traits

Trait FetchResponseListener

Source
pub trait FetchResponseListener {
    // Required methods
    fn process_request_body(&mut self, request_id: RequestId);
    fn process_request_eof(&mut self, request_id: RequestId);
    fn process_response(
        &mut self,
        request_id: RequestId,
        metadata: Result<FetchMetadata, NetworkError>,
    );
    fn process_response_chunk(&mut self, request_id: RequestId, chunk: Vec<u8>);
    fn process_response_eof(
        &mut self,
        request_id: RequestId,
        response: Result<ResourceFetchTiming, NetworkError>,
    );
    fn resource_timing(&self) -> &ResourceFetchTiming;
    fn resource_timing_mut(&mut self) -> &mut ResourceFetchTiming;
    fn submit_resource_timing(&mut self);
    fn process_csp_violations(
        &mut self,
        request_id: RequestId,
        violations: Vec<Violation>,
    );
}

Required Methods§

Source

fn process_request_body(&mut self, request_id: RequestId)

Source

fn process_request_eof(&mut self, request_id: RequestId)

Source

fn process_response( &mut self, request_id: RequestId, metadata: Result<FetchMetadata, NetworkError>, )

Source

fn process_response_chunk(&mut self, request_id: RequestId, chunk: Vec<u8>)

Source

fn process_response_eof( &mut self, request_id: RequestId, response: Result<ResourceFetchTiming, NetworkError>, )

Source

fn resource_timing(&self) -> &ResourceFetchTiming

Source

fn resource_timing_mut(&mut self) -> &mut ResourceFetchTiming

Source

fn submit_resource_timing(&mut self)

Source

fn process_csp_violations( &mut self, request_id: RequestId, violations: Vec<Violation>, )

Implementors§