#[repr(i32)]pub enum Command {
Show 19 variants
CmdUnknown = 0,
Ping = 1,
Pong = 2,
Login = 3,
LoginOut = 4,
SetBackground = 5,
SetLanguage = 6,
KickOnline = 7,
Close = 8,
ClientSendMessage = 10,
ClientPullMessage = 11,
ClientRequest = 12,
ClientAck = 13,
ServerPushMsg = 30,
ServerPushCustom = 31,
ServerPushNotice = 32,
ServerPushData = 33,
ServerAck = 34,
ServerResponse = 35,
}Expand description
消息标识符
Variants§
CmdUnknown = 0
Ping = 1
系统命令 (1-9)
ping
Pong = 2
pong
Login = 3
登录
LoginOut = 4
退出登录
SetBackground = 5
设置后台运行
SetLanguage = 6
语言设置
KickOnline = 7
强制用户下线
Close = 8
链接关闭
ClientSendMessage = 10
客户端命令 (10-29)
客户端发送消息
ClientPullMessage = 11
客户端拉取消息
ClientRequest = 12
客户端发送请求
ClientAck = 13
客户端确认接收
ServerPushMsg = 30
服务端命令 (30-49)
服务端推送消息
ServerPushCustom = 31
服务端推送自定义消息
ServerPushNotice = 32
服务端推送通知
ServerPushData = 33
服务端推送数据
ServerAck = 34
服务端确认接收
ServerResponse = 35
服务端响应
Implementations§
Source§impl Command
impl Command
Sourcepub fn as_str_name(&self) -> &'static str
pub fn as_str_name(&self) -> &'static str
String value of the enum field names used in the ProtoBuf definition.
The values are not transformed in any way and thus are considered stable (if the ProtoBuf definition does not change) and safe for programmatic use.
Sourcepub fn from_str_name(value: &str) -> Option<Self>
pub fn from_str_name(value: &str) -> Option<Self>
Creates an enum from field names used in the ProtoBuf definition.
Trait Implementations§
Source§impl Ord for Command
impl Ord for Command
Source§impl PartialOrd for Command
impl PartialOrd for Command
impl Copy for Command
impl Eq for Command
impl StructuralPartialEq for Command
Auto Trait Implementations§
impl Freeze for Command
impl RefUnwindSafe for Command
impl Send for Command
impl Sync for Command
impl Unpin for Command
impl UnwindSafe for Command
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more