Skip to main content

NetworkRegistration

Struct NetworkRegistration 

Source
pub struct NetworkRegistration { /* private fields */ }
Expand description

Event registration interface for Network domain.

Implementations§

Source§

impl NetworkRegistration

Source

pub fn data_received<F, Fut>(&self, callback: F)
where F: Fn(DataReceivedEvent, Option<String>) -> Fut + Send + Sync + 'static, Fut: Future<Output = ()> + Send + 'static,

Fired when data chunk was received over the network.

Source

pub fn event_source_message_received<F, Fut>(&self, callback: F)
where F: Fn(EventSourceMessageReceivedEvent, Option<String>) -> Fut + Send + Sync + 'static, Fut: Future<Output = ()> + Send + 'static,

Fired when EventSource message is received.

Source

pub fn loading_failed<F, Fut>(&self, callback: F)
where F: Fn(LoadingFailedEvent, Option<String>) -> Fut + Send + Sync + 'static, Fut: Future<Output = ()> + Send + 'static,

Fired when HTTP request has failed to load.

Source

pub fn loading_finished<F, Fut>(&self, callback: F)
where F: Fn(LoadingFinishedEvent, Option<String>) -> Fut + Send + Sync + 'static, Fut: Future<Output = ()> + Send + 'static,

Fired when HTTP request has finished loading.

Source

pub fn request_intercepted<F, Fut>(&self, callback: F)
where F: Fn(RequestInterceptedEvent, Option<String>) -> Fut + Send + Sync + 'static, Fut: Future<Output = ()> + Send + 'static,

Details of an intercepted HTTP request, which must be either allowed, blocked, modified or mocked. Deprecated, use Fetch.requestPaused instead.

Source

pub fn request_served_from_cache<F, Fut>(&self, callback: F)
where F: Fn(RequestServedFromCacheEvent, Option<String>) -> Fut + Send + Sync + 'static, Fut: Future<Output = ()> + Send + 'static,

Fired if request ended up loading from cache.

Source

pub fn request_will_be_sent<F, Fut>(&self, callback: F)
where F: Fn(RequestWillBeSentEvent, Option<String>) -> Fut + Send + Sync + 'static, Fut: Future<Output = ()> + Send + 'static,

Fired when page is about to send HTTP request.

Source

pub fn resource_changed_priority<F, Fut>(&self, callback: F)
where F: Fn(ResourceChangedPriorityEvent, Option<String>) -> Fut + Send + Sync + 'static, Fut: Future<Output = ()> + Send + 'static,

Fired when resource loading priority is changed

Source

pub fn signed_exchange_received<F, Fut>(&self, callback: F)
where F: Fn(SignedExchangeReceivedEvent, Option<String>) -> Fut + Send + Sync + 'static, Fut: Future<Output = ()> + Send + 'static,

Fired when a signed exchange was received over the network

Source

pub fn response_received<F, Fut>(&self, callback: F)
where F: Fn(ResponseReceivedEvent, Option<String>) -> Fut + Send + Sync + 'static, Fut: Future<Output = ()> + Send + 'static,

Fired when HTTP response is available.

Source

pub fn web_socket_closed<F, Fut>(&self, callback: F)
where F: Fn(WebSocketClosedEvent, Option<String>) -> Fut + Send + Sync + 'static, Fut: Future<Output = ()> + Send + 'static,

Fired when WebSocket is closed.

Source

pub fn web_socket_created<F, Fut>(&self, callback: F)
where F: Fn(WebSocketCreatedEvent, Option<String>) -> Fut + Send + Sync + 'static, Fut: Future<Output = ()> + Send + 'static,

Fired upon WebSocket creation.

Source

pub fn web_socket_frame_error<F, Fut>(&self, callback: F)
where F: Fn(WebSocketFrameErrorEvent, Option<String>) -> Fut + Send + Sync + 'static, Fut: Future<Output = ()> + Send + 'static,

Fired when WebSocket message error occurs.

Source

pub fn web_socket_frame_received<F, Fut>(&self, callback: F)
where F: Fn(WebSocketFrameReceivedEvent, Option<String>) -> Fut + Send + Sync + 'static, Fut: Future<Output = ()> + Send + 'static,

Fired when WebSocket message is received.

Source

pub fn web_socket_frame_sent<F, Fut>(&self, callback: F)
where F: Fn(WebSocketFrameSentEvent, Option<String>) -> Fut + Send + Sync + 'static, Fut: Future<Output = ()> + Send + 'static,

Fired when WebSocket message is sent.

Source

pub fn web_socket_handshake_response_received<F, Fut>(&self, callback: F)
where F: Fn(WebSocketHandshakeResponseReceivedEvent, Option<String>) -> Fut + Send + Sync + 'static, Fut: Future<Output = ()> + Send + 'static,

Fired when WebSocket handshake response becomes available.

Source

pub fn web_socket_will_send_handshake_request<F, Fut>(&self, callback: F)
where F: Fn(WebSocketWillSendHandshakeRequestEvent, Option<String>) -> Fut + Send + Sync + 'static, Fut: Future<Output = ()> + Send + 'static,

Fired when WebSocket is about to initiate handshake.

Source

pub fn web_transport_created<F, Fut>(&self, callback: F)
where F: Fn(WebTransportCreatedEvent, Option<String>) -> Fut + Send + Sync + 'static, Fut: Future<Output = ()> + Send + 'static,

Fired upon WebTransport creation.

Source

pub fn web_transport_connection_established<F, Fut>(&self, callback: F)
where F: Fn(WebTransportConnectionEstablishedEvent, Option<String>) -> Fut + Send + Sync + 'static, Fut: Future<Output = ()> + Send + 'static,

Fired when WebTransport handshake is finished.

Source

pub fn web_transport_closed<F, Fut>(&self, callback: F)
where F: Fn(WebTransportClosedEvent, Option<String>) -> Fut + Send + Sync + 'static, Fut: Future<Output = ()> + Send + 'static,

Fired when WebTransport is disposed.

Source

pub fn direct_tcp_socket_created<F, Fut>(&self, callback: F)
where F: Fn(DirectTcpSocketCreatedEvent, Option<String>) -> Fut + Send + Sync + 'static, Fut: Future<Output = ()> + Send + 'static,

Fired upon direct_socket.TCPSocket creation.

Source

pub fn direct_tcp_socket_opened<F, Fut>(&self, callback: F)
where F: Fn(DirectTcpSocketOpenedEvent, Option<String>) -> Fut + Send + Sync + 'static, Fut: Future<Output = ()> + Send + 'static,

Fired when direct_socket.TCPSocket connection is opened.

Source

pub fn direct_tcp_socket_aborted<F, Fut>(&self, callback: F)
where F: Fn(DirectTcpSocketAbortedEvent, Option<String>) -> Fut + Send + Sync + 'static, Fut: Future<Output = ()> + Send + 'static,

Fired when direct_socket.TCPSocket is aborted.

Source

pub fn direct_tcp_socket_closed<F, Fut>(&self, callback: F)
where F: Fn(DirectTcpSocketClosedEvent, Option<String>) -> Fut + Send + Sync + 'static, Fut: Future<Output = ()> + Send + 'static,

Fired when direct_socket.TCPSocket is closed.

Source

pub fn direct_tcp_socket_chunk_sent<F, Fut>(&self, callback: F)
where F: Fn(DirectTcpSocketChunkSentEvent, Option<String>) -> Fut + Send + Sync + 'static, Fut: Future<Output = ()> + Send + 'static,

Fired when data is sent to tcp direct socket stream.

Source

pub fn direct_tcp_socket_chunk_received<F, Fut>(&self, callback: F)
where F: Fn(DirectTcpSocketChunkReceivedEvent, Option<String>) -> Fut + Send + Sync + 'static, Fut: Future<Output = ()> + Send + 'static,

Fired when data is received from tcp direct socket stream.

Source

pub fn direct_udp_socket_joined_multicast_group<F, Fut>(&self, callback: F)
where F: Fn(DirectUdpSocketJoinedMulticastGroupEvent, Option<String>) -> Fut + Send + Sync + 'static, Fut: Future<Output = ()> + Send + 'static,

Source

pub fn direct_udp_socket_left_multicast_group<F, Fut>(&self, callback: F)
where F: Fn(DirectUdpSocketLeftMulticastGroupEvent, Option<String>) -> Fut + Send + Sync + 'static, Fut: Future<Output = ()> + Send + 'static,

Source

pub fn direct_udp_socket_created<F, Fut>(&self, callback: F)
where F: Fn(DirectUdpSocketCreatedEvent, Option<String>) -> Fut + Send + Sync + 'static, Fut: Future<Output = ()> + Send + 'static,

Fired upon direct_socket.UDPSocket creation.

Source

pub fn direct_udp_socket_opened<F, Fut>(&self, callback: F)
where F: Fn(DirectUdpSocketOpenedEvent, Option<String>) -> Fut + Send + Sync + 'static, Fut: Future<Output = ()> + Send + 'static,

Fired when direct_socket.UDPSocket connection is opened.

Source

pub fn direct_udp_socket_aborted<F, Fut>(&self, callback: F)
where F: Fn(DirectUdpSocketAbortedEvent, Option<String>) -> Fut + Send + Sync + 'static, Fut: Future<Output = ()> + Send + 'static,

Fired when direct_socket.UDPSocket is aborted.

Source

pub fn direct_udp_socket_closed<F, Fut>(&self, callback: F)
where F: Fn(DirectUdpSocketClosedEvent, Option<String>) -> Fut + Send + Sync + 'static, Fut: Future<Output = ()> + Send + 'static,

Fired when direct_socket.UDPSocket is closed.

Source

pub fn direct_udp_socket_chunk_sent<F, Fut>(&self, callback: F)
where F: Fn(DirectUdpSocketChunkSentEvent, Option<String>) -> Fut + Send + Sync + 'static, Fut: Future<Output = ()> + Send + 'static,

Fired when message is sent to udp direct socket stream.

Source

pub fn direct_udp_socket_chunk_received<F, Fut>(&self, callback: F)
where F: Fn(DirectUdpSocketChunkReceivedEvent, Option<String>) -> Fut + Send + Sync + 'static, Fut: Future<Output = ()> + Send + 'static,

Fired when message is received from udp direct socket stream.

Source

pub fn request_will_be_sent_extra_info<F, Fut>(&self, callback: F)
where F: Fn(RequestWillBeSentExtraInfoEvent, Option<String>) -> Fut + Send + Sync + 'static, Fut: Future<Output = ()> + Send + 'static,

Fired when additional information about a requestWillBeSent event is available from the network stack. Not every requestWillBeSent event will have an additional requestWillBeSentExtraInfo fired for it, and there is no guarantee whether requestWillBeSent or requestWillBeSentExtraInfo will be fired first for the same request.

Source

pub fn response_received_extra_info<F, Fut>(&self, callback: F)
where F: Fn(ResponseReceivedExtraInfoEvent, Option<String>) -> Fut + Send + Sync + 'static, Fut: Future<Output = ()> + Send + 'static,

Fired when additional information about a responseReceived event is available from the network stack. Not every responseReceived event will have an additional responseReceivedExtraInfo for it, and responseReceivedExtraInfo may be fired before or after responseReceived.

Source

pub fn response_received_early_hints<F, Fut>(&self, callback: F)
where F: Fn(ResponseReceivedEarlyHintsEvent, Option<String>) -> Fut + Send + Sync + 'static, Fut: Future<Output = ()> + Send + 'static,

Fired when 103 Early Hints headers is received in addition to the common response. Not every responseReceived event will have an responseReceivedEarlyHints fired. Only one responseReceivedEarlyHints may be fired for eached responseReceived event.

Source

pub fn trust_token_operation_done<F, Fut>(&self, callback: F)
where F: Fn(TrustTokenOperationDoneEvent, Option<String>) -> Fut + Send + Sync + 'static, Fut: Future<Output = ()> + Send + 'static,

Fired exactly once for each Trust Token operation. Depending on the type of the operation and whether the operation succeeded or failed, the event is fired before the corresponding request was sent or after the response was received.

Source

pub fn policy_updated<F, Fut>(&self, callback: F)
where F: Fn(PolicyUpdatedEvent, Option<String>) -> Fut + Send + Sync + 'static, Fut: Future<Output = ()> + Send + 'static,

Fired once security policy has been updated.

Source

pub fn reporting_api_report_added<F, Fut>(&self, callback: F)
where F: Fn(ReportingApiReportAddedEvent, Option<String>) -> Fut + Send + Sync + 'static, Fut: Future<Output = ()> + Send + 'static,

Is sent whenever a new report is added. And after ‘enableReportingApi’ for all existing reports.

Source

pub fn reporting_api_report_updated<F, Fut>(&self, callback: F)
where F: Fn(ReportingApiReportUpdatedEvent, Option<String>) -> Fut + Send + Sync + 'static, Fut: Future<Output = ()> + Send + 'static,

Source

pub fn reporting_api_endpoints_changed_for_origin<F, Fut>(&self, callback: F)
where F: Fn(ReportingApiEndpointsChangedForOriginEvent, Option<String>) -> Fut + Send + Sync + 'static, Fut: Future<Output = ()> + Send + 'static,

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more