aboutsummaryrefslogtreecommitdiff
path: root/src/protocol/commands/_t_upcase.rs
blob: e63833016b82171612bbc7ab460422beac22bc6b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use super::prelude::*;
use crate::protocol::common::thread_id::ThreadId;

#[derive(Debug)]
pub struct T {
    pub thread: ThreadId,
}

impl<'a> ParseCommand<'a> for T {
    #[inline(always)]
    fn from_packet(buf: PacketBuf<'a>) -> Option<Self> {
        let body = buf.into_body();
        Some(T {
            thread: body.try_into().ok()?,
        })
    }
}