cloudflare / chrome-devtools-rs

Rust library for the Chrome Devtools Protocol
MIT License
62 stars 4 forks source link

create a framework for sending and receiving different message types #23

Open EverlastingBugstopper opened 4 years ago

EverlastingBugstopper commented 4 years ago

let these things be structs and auto-create ids that link their creation to incoming messages

        let enable_profiler = WsMessage::text(
            r#"{
                "id": 1,
                "method": "Profiler.enable"
            }"#,
        );
        let enable_runtime = WsMessage::text(
            r#"{
                "id": 2,
                "method": "Runtime.enable"
            }"#,
        );
        let enable_debugger = WsMessage::text(
            r#"{
                "id": 3,
                "method": "Debugger.enable"
            }"#,
        );

eventually we'll want to publish that crate and use the published version but for now we've linked it to a commit hash