pub struct MqCommand {
pub req_code: i16,
pub l_flag: i8,
pub v_flag: i16,
pub opaque: i32,
pub request_flag: i32,
pub r_len: i32,
pub r_body: Vec<u8>,
pub e_len: i32,
pub e_body: Vec<u8>,
pub body: Vec<u8>,
pub header_serialize_method: u8,
}Fields§
§req_code: i16§l_flag: i8§v_flag: i16for rust ,it always 7, means other language
opaque: i32§request_flag: i32§r_len: i32§r_body: Vec<u8>§e_len: i32§e_body: Vec<u8>§body: Vec<u8>§header_serialize_method: u8Implementations§
Source§impl MqCommand
impl MqCommand
pub fn new() -> MqCommand
pub fn new_with_body( req_code: i16, r_body: Vec<u8>, e_body: Vec<u8>, body: Vec<u8>, ) -> MqCommand
pub async fn read_from_stream_with_opaque( broker_stream: &mut TcpStream, opaque: i32, ) -> Self
pub async fn read_from_stream(stream: &mut TcpStream) -> Self
pub async fn read_from_read_half(stream: &mut OwnedReadHalf) -> Option<Self>
pub fn convert_bytes_to_mq_command(bytes: Vec<u8>) -> MqCommand
pub fn convert_extend_header_to_json(&self) -> String
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MqCommand
impl RefUnwindSafe for MqCommand
impl Send for MqCommand
impl Sync for MqCommand
impl Unpin for MqCommand
impl UnwindSafe for MqCommand
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more