Struct rustls::internal::msgs::fragmenter::MessageFragmenter
source · [−]pub struct MessageFragmenter { /* private fields */ }
Implementations
sourceimpl MessageFragmenter
impl MessageFragmenter
sourcepub fn new(max_fragment_len: usize) -> MessageFragmenter
pub fn new(max_fragment_len: usize) -> MessageFragmenter
Make a new fragmenter. max_fragment_len
is the maximum
fragment size that will be produced – this does not
include overhead (so a max_fragment_len
of 5 will produce
10 byte packets).
sourcepub fn fragment(&self, msg: Message, out: &mut VecDeque<Message>)
pub fn fragment(&self, msg: Message, out: &mut VecDeque<Message>)
Take the Message msg
and re-fragment it into new
messages whose fragment is no more than max_frag.
The new messages are appended to the out
deque.
Payloads are copied.
sourcepub fn fragment_borrow<'a>(
&self,
typ: ContentType,
version: ProtocolVersion,
payload: &'a [u8],
out: &mut VecDeque<BorrowMessage<'a>>
)
pub fn fragment_borrow<'a>(
&self,
typ: ContentType,
version: ProtocolVersion,
payload: &'a [u8],
out: &mut VecDeque<BorrowMessage<'a>>
)
Enqueue borrowed fragments of (version, typ, payload) which
are no longer than max_frag onto the out
deque.
Auto Trait Implementations
impl RefUnwindSafe for MessageFragmenter
impl Send for MessageFragmenter
impl Sync for MessageFragmenter
impl Unpin for MessageFragmenter
impl UnwindSafe for MessageFragmenter
Blanket Implementations
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstablefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more