pub struct C2cHead {
pub to_uin: Option<u64>,
pub from_uin: Option<u64>,
pub cc_type: Option<u32>,
pub cc_cmd: Option<u32>,
pub auth_pic_sig: Option<Vec<u8>>,
pub auth_sig: Option<Vec<u8>>,
pub auth_buf: Option<Vec<u8>>,
pub server_time: Option<u32>,
pub client_time: Option<u32>,
pub rand: Option<u32>,
pub phone_number: Option<String>,
}
Fields§
§to_uin: Option<u64>
§from_uin: Option<u64>
§cc_type: Option<u32>
§cc_cmd: Option<u32>
§auth_pic_sig: Option<Vec<u8>>
§auth_sig: Option<Vec<u8>>
§auth_buf: Option<Vec<u8>>
§server_time: Option<u32>
§client_time: Option<u32>
§rand: Option<u32>
§phone_number: Option<String>
Implementations§
source§impl C2cHead
impl C2cHead
sourcepub fn to_uin(&self) -> u64
pub fn to_uin(&self) -> u64
Returns the value of to_uin
, or the default value if to_uin
is unset.
sourcepub fn from_uin(&self) -> u64
pub fn from_uin(&self) -> u64
Returns the value of from_uin
, or the default value if from_uin
is unset.
sourcepub fn cc_type(&self) -> u32
pub fn cc_type(&self) -> u32
Returns the value of cc_type
, or the default value if cc_type
is unset.
sourcepub fn cc_cmd(&self) -> u32
pub fn cc_cmd(&self) -> u32
Returns the value of cc_cmd
, or the default value if cc_cmd
is unset.
sourcepub fn auth_pic_sig(&self) -> &[u8] ⓘ
pub fn auth_pic_sig(&self) -> &[u8] ⓘ
Returns the value of auth_pic_sig
, or the default value if auth_pic_sig
is unset.
sourcepub fn auth_sig(&self) -> &[u8] ⓘ
pub fn auth_sig(&self) -> &[u8] ⓘ
Returns the value of auth_sig
, or the default value if auth_sig
is unset.
sourcepub fn auth_buf(&self) -> &[u8] ⓘ
pub fn auth_buf(&self) -> &[u8] ⓘ
Returns the value of auth_buf
, or the default value if auth_buf
is unset.
sourcepub fn server_time(&self) -> u32
pub fn server_time(&self) -> u32
Returns the value of server_time
, or the default value if server_time
is unset.
sourcepub fn client_time(&self) -> u32
pub fn client_time(&self) -> u32
Returns the value of client_time
, or the default value if client_time
is unset.
sourcepub fn phone_number(&self) -> &str
pub fn phone_number(&self) -> &str
Returns the value of phone_number
, or the default value if phone_number
is unset.
Trait Implementations§
source§impl Message for C2cHead
impl Message for C2cHead
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
source§fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Self: Sized,
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Self: Sized,
Encodes the message to a buffer. Read more
source§fn encode_to_vec(&self) -> Vec<u8, Global>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8, Global>where
Self: Sized,
Encodes the message to a newly allocated buffer.
source§fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Self: Sized,
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Self: Sized,
Encodes the message with a length-delimiter to a buffer. Read more
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8, Global>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8, Global>where
Self: Sized,
Encodes the message with a length-delimiter to a newly allocated buffer.
source§fn decode<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
fn decode<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
Decodes an instance of the message from a buffer. Read more
source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
Decodes a length-delimited instance of the message from the buffer.
source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
Decodes an instance of the message from a buffer, and merges it into
self
. Read moresource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
Decodes a length-delimited instance of the message from buffer, and
merges it into
self
. Read more