Remove AsyncResponseTarget.

This commit is contained in:
Ms2ger 2016-10-11 18:14:23 +02:00
parent fe3d512ea4
commit 4bbeecb99f

View file

@ -288,19 +288,6 @@ impl<T: FetchResponseListener> Action<T> for FetchResponseMsg {
}
}
/// A target for async networking events. Commonly used to dispatch a runnable event to another
/// thread storing the wrapped closure for later execution.
#[derive(Deserialize, Serialize)]
pub struct AsyncResponseTarget {
pub sender: IpcSender<ResponseAction>,
}
impl AsyncResponseTarget {
pub fn invoke_with_listener(&self, action: ResponseAction) {
self.sender.send(action).unwrap()
}
}
/// A wrapper for a network load that can either be channel or event-based.
#[derive(Deserialize, Serialize)]
pub enum LoadConsumer {