mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Webbluetooth Async behaviour
This commit is contained in:
parent
4a7ea72429
commit
e7e7c74c9e
19 changed files with 806 additions and 729 deletions
|
@ -10,6 +10,7 @@ name = "net_traits"
|
|||
path = "lib.rs"
|
||||
|
||||
[dependencies]
|
||||
bluetooth_traits = {path = "../bluetooth_traits"}
|
||||
util = {path = "../util"}
|
||||
msg = {path = "../msg"}
|
||||
ipc-channel = "0.5"
|
||||
|
|
|
@ -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