pub enum MessageType {
Show 18 variants
AuthorizationRequest = 1,
AuthorizationResponse = 2,
DisconnectRequest = 3,
DisconnectResponse = 4,
SendMessageRequest = 5,
SendMessageResponse = 6,
PushMessageRequest = 7,
PushMessageResponse = 8,
PushBatchRequest = 9,
PushBatchResponse = 10,
PingRequest = 11,
PongResponse = 12,
SubscribeRequest = 13,
SubscribeResponse = 14,
PublishRequest = 15,
PublishResponse = 16,
RpcRequest = 17,
RpcResponse = 18,
}Expand description
消息类型枚举
Variants§
AuthorizationRequest = 1
连接请求 - 客户端发起连接
AuthorizationResponse = 2
连接响应 - 服务端连接确认
DisconnectRequest = 3
断开连接请求 - 客户端主动断开
DisconnectResponse = 4
断开连接响应 - 服务端断开确认
SendMessageRequest = 5
发送消息请求 - 客户端发送消息
SendMessageResponse = 6
发送消息响应 - 服务端发送确认
PushMessageRequest = 7
推送消息请求 - 服务端推送消息
PushMessageResponse = 8
推送消息响应 - 客户端接收确认
PushBatchRequest = 9
批量接收消息请求 - 服务端批量推送消息
PushBatchResponse = 10
批量接收消息响应 - 客户端批量接收确认
PingRequest = 11
心跳请求 - 客户端发送心跳
PongResponse = 12
心跳响应 - 服务端心跳回复
SubscribeRequest = 13
订阅请求 - 客户端订阅频道
SubscribeResponse = 14
订阅响应 - 服务端订阅确认
PublishRequest = 15
推送消息请求 - 服务端推送频道消息
PublishResponse = 16
推送消息响应 - 客户端推送确认
RpcRequest = 17
RPC消息请求 - 客户端发送RPC消息
RpcResponse = 18
RPC消息响应 - 服务端发送RPC消息
Trait Implementations§
Source§impl Clone for MessageType
impl Clone for MessageType
Source§fn clone(&self) -> MessageType
fn clone(&self) -> MessageType
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MessageType
impl Debug for MessageType
Source§impl<'de> Deserialize<'de> for MessageType
impl<'de> Deserialize<'de> for MessageType
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<MessageType> for u8
impl From<MessageType> for u8
Source§fn from(msg_type: MessageType) -> Self
fn from(msg_type: MessageType) -> Self
Converts to this type from the input type.
Source§impl From<u8> for MessageType
impl From<u8> for MessageType
Source§impl Hash for MessageType
impl Hash for MessageType
Source§impl PartialEq for MessageType
impl PartialEq for MessageType
Source§impl Serialize for MessageType
impl Serialize for MessageType
impl Copy for MessageType
impl Eq for MessageType
impl StructuralPartialEq for MessageType
Auto Trait Implementations§
impl Freeze for MessageType
impl RefUnwindSafe for MessageType
impl Send for MessageType
impl Sync for MessageType
impl Unpin for MessageType
impl UnsafeUnpin for MessageType
impl UnwindSafe for MessageType
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