mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
Implement a dummy protocolDescription in the root actor
This commit is contained in:
parent
9a2955d4da
commit
14653e2875
3 changed files with 47 additions and 2 deletions
|
@ -12,6 +12,20 @@ use std::error::Error;
|
|||
use std::io::{Read, Write};
|
||||
use std::net::TcpStream;
|
||||
|
||||
#[derive(Serialize)]
|
||||
pub struct ActorDescription {
|
||||
pub category: &'static str,
|
||||
pub typeName: &'static str,
|
||||
pub methods: Vec<Method>,
|
||||
}
|
||||
|
||||
#[derive(Serialize)]
|
||||
pub struct Method {
|
||||
pub name: &'static str,
|
||||
pub request: Value,
|
||||
pub response: Value,
|
||||
}
|
||||
|
||||
pub trait JsonPacketStream {
|
||||
fn write_json_packet<T: Serialize>(&mut self, obj: &T);
|
||||
fn read_json_packet(&mut self) -> Result<Option<Value>, String>;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue