pub struct NegotiationResult {
pub serialization_format: SerializationFormat,
pub serialization_format_specified: bool,
pub compression: CompressionAlgorithm,
pub encryption: EncryptionAlgorithm,
pub is_forced: bool,
pub device_info: Option<DeviceInfo>,
pub user_id: Option<String>,
}Expand description
连接协商结果
Fields§
§serialization_format: SerializationFormat序列化格式(客户端请求的格式)
serialization_format_specified: bool客户端是否显式请求了序列化格式
compression: CompressionAlgorithm压缩算法(客户端请求的压缩方式)
encryption: EncryptionAlgorithm加密方式
is_forced: bool是否强制指定格式(客户端强制模式,服务端必须使用客户端指定的格式)
device_info: Option<DeviceInfo>设备信息(如果客户端提供)
user_id: Option<String>用户 ID(如果客户端在 CONNECT 中提供)
Trait Implementations§
Source§impl Clone for NegotiationResult
impl Clone for NegotiationResult
Source§fn clone(&self) -> NegotiationResult
fn clone(&self) -> NegotiationResult
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 NegotiationResult
impl Debug for NegotiationResult
Auto Trait Implementations§
impl Freeze for NegotiationResult
impl RefUnwindSafe for NegotiationResult
impl Send for NegotiationResult
impl Sync for NegotiationResult
impl Unpin for NegotiationResult
impl UnsafeUnpin for NegotiationResult
impl UnwindSafe for NegotiationResult
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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