blob: 066131cc30a02e6407ecaa82f45149092e8609fa (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
use async_trait::async_trait;
use std::hash::Hash;
use tokio::io::BufReader;
use crate::packets::{Packet, PacketTrait, ProtocolPacket};
use super::StatusPacket;
#[derive(Hash, Clone, Debug)]
pub struct ServerboundStatusRequestPacket {}
#[async_trait]
impl PacketTrait for ServerboundStatusRequestPacket {
fn get(self) -> StatusPacket {
StatusPacket::ServerboundStatusRequestPacket(self)
}
fn write(&self, _buf: &mut Vec<u8>) {
panic!("ServerboundStatusRequestPacket::write not implemented")
}
async fn read<T: tokio::io::AsyncRead + std::marker::Unpin + std::marker::Send>(
_buf: &mut BufReader<T>,
) -> Result<Packet, String> {
Err("ServerboundStatusRequestPacket::read not implemented".to_string())
}
}
|