valence_protocol/packets/play/
command_suggestions_s2c.rs

1use std::borrow::Cow;
2
3use valence_text::Text;
4
5use crate::{Decode, Encode, Packet, VarInt};
6
7#[derive(Clone, Debug, Encode, Decode, Packet)]
8pub struct CommandSuggestionsS2c<'a> {
9    pub id: VarInt,
10    pub start: VarInt,
11    pub length: VarInt,
12    pub matches: Vec<CommandSuggestionsMatch<'a>>,
13}
14
15#[derive(Clone, PartialEq, Debug, Encode, Decode)]
16pub struct CommandSuggestionsMatch<'a> {
17    pub suggested_match: &'a str,
18    pub tooltip: Option<Cow<'a, Text>>,
19}