1
2
Fork 0
mirror of https://github.com/mat-1/azalea.git synced 2025-08-02 06:16:04 +00:00
azalea/azalea-protocol/src/packets/status/serverbound_status_request_packet.rs
2021-12-15 23:10:55 -06:00

23 lines
668 B
Rust

use std::hash::Hash;
use tokio::io::BufReader;
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>) {
panic!("ServerboundStatusRequestPacket::write not implemented")
}
pub async fn read<T: tokio::io::AsyncRead + std::marker::Unpin + std::marker::Send>(
_buf: &mut BufReader<T>,
) -> Result<StatusPacket, String> {
Err("ServerboundStatusRequestPacket::read not implemented".to_string())
}
}