mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Move ResponseAction to the image cache.
This commit is contained in:
parent
4bbeecb99f
commit
634a3989ad
2 changed files with 10 additions and 13 deletions
|
@ -263,18 +263,6 @@ pub trait Action<Listener> {
|
|||
fn process(self, listener: &mut Listener);
|
||||
}
|
||||
|
||||
/// Data for passing between threads/processes to indicate a particular action to
|
||||
/// take on a provided network listener.
|
||||
#[derive(Deserialize, Serialize)]
|
||||
pub enum ResponseAction {
|
||||
/// Invoke headers_available
|
||||
HeadersAvailable(Result<Metadata, NetworkError>),
|
||||
/// Invoke data_available
|
||||
DataAvailable(Vec<u8>),
|
||||
/// Invoke response_complete
|
||||
ResponseComplete(Result<(), NetworkError>)
|
||||
}
|
||||
|
||||
impl<T: FetchResponseListener> Action<T> for FetchResponseMsg {
|
||||
/// Execute the default action on a provided listener.
|
||||
fn process(self, listener: &mut T) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue