30 lines
827 B
Rust
30 lines
827 B
Rust
tonic::include_proto!("signaling"); // The string specified here must match the proto package name
|
|
|
|
#[cfg(test)]
|
|
mod test {
|
|
#[test]
|
|
fn serde_serialization() {
|
|
println!(
|
|
"{}",
|
|
serde_json::to_string(&crate::SignalingMessage {
|
|
message: Some(crate::signaling_message::Message::Bootstrap(())),
|
|
..Default::default()
|
|
})
|
|
.unwrap()
|
|
);
|
|
|
|
println!(
|
|
"{}",
|
|
serde_json::to_string(&crate::SignalingMessage {
|
|
message: Some(crate::signaling_message::Message::SessionOffer(
|
|
crate::SdpMessage {
|
|
..Default::default()
|
|
}
|
|
)),
|
|
..Default::default()
|
|
})
|
|
.unwrap()
|
|
);
|
|
}
|
|
}
|