mirror of
https://github.com/servo/servo.git
synced 2025-07-28 17:50:37 +01:00
Webbluetooth Async behaviour
This commit is contained in:
parent
4a7ea72429
commit
e7e7c74c9e
19 changed files with 806 additions and 729 deletions
|
@ -9,6 +9,7 @@
|
|||
|
||||
#![deny(unsafe_code)]
|
||||
|
||||
extern crate bluetooth_traits;
|
||||
extern crate cookie as cookie_rs;
|
||||
extern crate heapsize;
|
||||
#[macro_use] extern crate heapsize_derive;
|
||||
|
@ -32,6 +33,7 @@ extern crate uuid;
|
|||
extern crate webrender_traits;
|
||||
extern crate websocket;
|
||||
|
||||
use bluetooth_traits::{BluetoothResponseListener, BluetoothResponseResult};
|
||||
use cookie_rs::Cookie;
|
||||
use filemanager_thread::FileManagerThreadMsg;
|
||||
use heapsize::HeapSizeOf;
|
||||
|
@ -291,6 +293,13 @@ impl<T: FetchResponseListener> Action<T> for FetchResponseMsg {
|
|||
}
|
||||
}
|
||||
|
||||
impl<T: BluetoothResponseListener> Action<T> for BluetoothResponseResult {
|
||||
/// Execute the default action on a provided listener.
|
||||
fn process(self, listener: &mut T) {
|
||||
listener.response(self)
|
||||
}
|
||||
}
|
||||
|
||||
/// A wrapper for a network load that can either be channel or event-based.
|
||||
#[derive(Deserialize, Serialize)]
|
||||
pub enum LoadConsumer {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue