mirror of
https://github.com/servo/servo.git
synced 2025-08-04 21:20:23 +01:00
Implement a dummy sources message in the thread actor
This commit is contained in:
parent
ef265b1c0b
commit
9a2955d4da
1 changed files with 18 additions and 0 deletions
|
@ -39,6 +39,15 @@ struct ReconfigureReply {
|
||||||
from: String
|
from: String
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(Serialize)]
|
||||||
|
struct SourcesReply {
|
||||||
|
from: String,
|
||||||
|
sources: Vec<Source>,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Serialize)]
|
||||||
|
enum Source {}
|
||||||
|
|
||||||
pub struct ThreadActor {
|
pub struct ThreadActor {
|
||||||
name: String,
|
name: String,
|
||||||
}
|
}
|
||||||
|
@ -88,6 +97,15 @@ impl Actor for ThreadActor {
|
||||||
ActorMessageStatus::Processed
|
ActorMessageStatus::Processed
|
||||||
}
|
}
|
||||||
|
|
||||||
|
"sources" => {
|
||||||
|
let msg = SourcesReply {
|
||||||
|
from: self.name(),
|
||||||
|
sources: vec![],
|
||||||
|
};
|
||||||
|
stream.write_json_packet(&msg);
|
||||||
|
ActorMessageStatus::Processed
|
||||||
|
}
|
||||||
|
|
||||||
_ => ActorMessageStatus::Ignored,
|
_ => ActorMessageStatus::Ignored,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue