pub struct ProtocolV2Writer {
pub msg_buffer: Vec<u8>,
pub msg_body_size: u32,
}
Fields§
§msg_buffer: Vec<u8>
§msg_body_size: u32
Implementations§
Source§impl ProtocolV2Writer
impl ProtocolV2Writer
pub fn new( msg_size: u32, req_id: i64, sender: &ServiceKey, receiver: &ServiceKey, ) -> ProtocolV2Writer
pub fn write_req_id(&mut self, req_id: i64)
Sourcepub fn write_conn_id(&mut self, conn_id: i64)
pub fn write_conn_id(&mut self, conn_id: i64)
pub fn write_conn_id_to_message(message: &mut Vec<u8>, conn_id: i64)
pub fn write_msg_type(&mut self, msg_type: MsgType)
pub fn msg_body_buffer(&mut self) -> &mut [u8] ⓘ
pub fn write_msg_body(&mut self, message: &Vec<u8>)
pub fn write_msg_body_by_arr(&mut self, message: &[u8])
Sourcepub fn write_timeout(&mut self, timeout: u32)
pub fn write_timeout(&mut self, timeout: u32)
Auto Trait Implementations§
impl Freeze for ProtocolV2Writer
impl RefUnwindSafe for ProtocolV2Writer
impl Send for ProtocolV2Writer
impl Sync for ProtocolV2Writer
impl Unpin for ProtocolV2Writer
impl UnwindSafe for ProtocolV2Writer
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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