mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Remove LoadConsumer, LoadResponse, ProgressMsg.
This commit is contained in:
parent
cd40bb54ae
commit
6bea1b53e6
1 changed files with 0 additions and 28 deletions
|
@ -245,12 +245,6 @@ impl<T: BluetoothResponseListener> Action<T> for BluetoothResponseResult {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A wrapper for a network load that can either be channel or event-based.
|
|
||||||
#[derive(Deserialize, Serialize)]
|
|
||||||
pub enum LoadConsumer {
|
|
||||||
Channel(IpcSender<LoadResponse>),
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Handle to a resource thread
|
/// Handle to a resource thread
|
||||||
pub type CoreResourceThread = IpcSender<CoreResourceMsg>;
|
pub type CoreResourceThread = IpcSender<CoreResourceMsg>;
|
||||||
|
|
||||||
|
@ -401,19 +395,6 @@ pub fn fetch_async<F>(request: RequestInit,
|
||||||
core_resource_thread.send(CoreResourceMsg::Fetch(request, action_sender)).unwrap();
|
core_resource_thread.send(CoreResourceMsg::Fetch(request, action_sender)).unwrap();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Message sent in response to `Load`. Contains metadata, and a port
|
|
||||||
/// for receiving the data.
|
|
||||||
///
|
|
||||||
/// Even if loading fails immediately, we send one of these and the
|
|
||||||
/// progress_port will provide the error.
|
|
||||||
#[derive(Serialize, Deserialize)]
|
|
||||||
pub struct LoadResponse {
|
|
||||||
/// Metadata, such as from HTTP headers.
|
|
||||||
pub metadata: Metadata,
|
|
||||||
/// Port for reading data.
|
|
||||||
pub progress_port: IpcReceiver<ProgressMsg>,
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(Clone, Deserialize, Serialize, HeapSizeOf)]
|
#[derive(Clone, Deserialize, Serialize, HeapSizeOf)]
|
||||||
pub struct ResourceCorsData {
|
pub struct ResourceCorsData {
|
||||||
/// CORS Preflight flag
|
/// CORS Preflight flag
|
||||||
|
@ -499,15 +480,6 @@ pub enum CookieSource {
|
||||||
NonHTTP,
|
NonHTTP,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Messages sent in response to a `Load` message
|
|
||||||
#[derive(PartialEq, Debug, Deserialize, Serialize)]
|
|
||||||
pub enum ProgressMsg {
|
|
||||||
/// Binary data - there may be multiple of these
|
|
||||||
Payload(Vec<u8>),
|
|
||||||
/// Indicates loading is complete, either successfully or not
|
|
||||||
Done(Result<(), NetworkError>),
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Convenience function for synchronously loading a whole resource.
|
/// Convenience function for synchronously loading a whole resource.
|
||||||
pub fn load_whole_resource(request: RequestInit,
|
pub fn load_whole_resource(request: RequestInit,
|
||||||
core_resource_thread: &CoreResourceThread)
|
core_resource_thread: &CoreResourceThread)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue