pub(crate) struct OTMessage {
data: Bytes,
original_length: u64,
send_header: bool,
mid: u64,
sid: Sid,
start: u64,
}Expand description
Contains a outgoing message for TCP protocol All Chunks have the same size, except for the last chunk which can end earlier. E.g.
ⓘ
msg = OTMessage::new();
msg.next();
msg.next();Fields§
§data: Bytes§original_length: u64§send_header: bool§mid: u64§sid: Sid§start: u64Implementations§
Source§impl OTMessage
impl OTMessage
pub(crate) const FRAME_DATA_SIZE: u64 = 1_400u64
pub(crate) fn new(data: Bytes, mid: u64, sid: Sid) -> Self
fn get_header(&self) -> OTFrame
fn get_next_data(&mut self) -> OTFrame
pub(crate) fn get_sid_len(&self) -> (Sid, u64)
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for OTMessage
impl RefUnwindSafe for OTMessage
impl Send for OTMessage
impl Sync for OTMessage
impl Unpin for OTMessage
impl UnwindSafe for OTMessage
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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