doip_definitions/doip_payload/alive_check_request.rs
1/// Checks the TCP Socket is still alive
2///
3/// Sent with no payload, the `AliveCheckRequest` is utilised to maintain a connection
4/// to a TCP socket or to check the status of one.
5#[cfg_attr(feature = "python-bindings", pyo3::pyclass)]
6#[derive(Copy, Clone, Debug, PartialEq)]
7pub struct AliveCheckRequest {}
8
9impl From<AliveCheckRequest> for [u8; 0] {
10 fn from(_: AliveCheckRequest) -> Self {
11 []
12 }
13}
14
15impl From<&[u8]> for AliveCheckRequest {
16 fn from(_: &[u8]) -> Self {
17 AliveCheckRequest {}
18 }
19}