cast-sender 0.3.0

Fully asynchronous implementation of the Google Cast CASTV2 protocol, allowing communication with receivers such as Chromecast or Google TV devices.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use crate::Payload;

#[derive(Serialize, Deserialize, Clone, Debug)]
#[serde(rename_all = "SCREAMING_SNAKE_CASE")]
#[serde(tag = "type")]
pub enum Heartbeat {
    Ping,
    Pong,
}

impl From<Heartbeat> for Payload {
    fn from(val: Heartbeat) -> Self {
        Payload::Heartbeat(val.clone())
    }
}