aboutsummaryrefslogtreecommitdiff
path: root/azalea-protocol/src/packets/status/serverbound_status_request_packet.rs
blob: af98f7cb08ed115ef4a7882a5a48cafd26c4f99d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
use std::hash::Hash;

use super::StatusPacket;

#[derive(Hash, Clone, Debug)]
pub struct ServerboundStatusRequestPacket {}

impl ServerboundStatusRequestPacket {
    pub fn get(self) -> StatusPacket {
        StatusPacket::ServerboundStatusRequestPacket(self)
    }

    pub fn write(&self, _buf: &mut Vec<u8>) -> Result<(), std::io::Error> {
        panic!("ServerboundStatusRequestPacket::write not implemented")
    }

    pub async fn read<T: tokio::io::AsyncRead + std::marker::Unpin + std::marker::Send>(
        _buf: &mut T,
    ) -> Result<StatusPacket, String> {
        Err("ServerboundStatusRequestPacket::read not implemented".to_string())
    }
}