MCPcopy Create free account
hub / github.com/NativeScript/SimDeck / to_downstream_message

Function to_downstream_message

packages/server/src/devtools.rs:419–427  ·  view source on GitHub ↗
(message: UpstreamMessage)

Source from the content-addressed store, hash-verified

417}
418
419fn to_downstream_message(message: UpstreamMessage) -> Option<Message> {
420 match message {
421 UpstreamMessage::Text(text) => Some(Message::Text(text.to_string().into())),
422 UpstreamMessage::Binary(bytes) => Some(Message::Binary(bytes)),
423 UpstreamMessage::Ping(bytes) => Some(Message::Ping(bytes)),
424 UpstreamMessage::Pong(bytes) => Some(Message::Pong(bytes)),
425 UpstreamMessage::Close(_) | UpstreamMessage::Frame(_) => None,
426 }
427}
428
429async fn fetch_devtools_target_list(port: u16) -> Result<Value, String> {
430 let mut errors = Vec::new();

Callers

nothing calls this directly

Calls 1

TextInterface · 0.85

Tested by

no test coverage detected