Struct tlspuffin::tls::rustls::msgs::fragmenter::MessageFragmenter
source · pub struct MessageFragmenter {
max_frag: usize,
}
Fields§
§max_frag: usize
Implementations§
source§impl MessageFragmenter
impl MessageFragmenter
sourcepub fn new(max_fragment_size: Option<usize>) -> Result<Self, Error>
pub fn new(max_fragment_size: Option<usize>) -> Result<Self, Error>
Make a new fragmenter.
max_fragment_size
is the maximum fragment size that will be produced –
this includes overhead. A max_fragment_size
of 10 will produce TLS fragments
up to 10 bytes.
sourcepub fn fragment(&self, msg: PlainMessage, out: &mut VecDeque<PlainMessage>)
pub fn fragment(&self, msg: PlainMessage, out: &mut VecDeque<PlainMessage>)
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<BorrowedPlainMessage<'a>>,
)
pub fn fragment_borrow<'a>( &self, typ: ContentType, version: ProtocolVersion, payload: &'a [u8], out: &mut VecDeque<BorrowedPlainMessage<'a>>, )
Enqueue borrowed fragments of (version, typ, payload) which
are no longer than max_frag onto the out
deque.
pub fn set_max_fragment_size(&mut self, new: Option<usize>) -> Result<(), Error>
Auto Trait Implementations§
impl Freeze for MessageFragmenter
impl RefUnwindSafe for MessageFragmenter
impl Send for MessageFragmenter
impl Sync for MessageFragmenter
impl Unpin for MessageFragmenter
impl UnwindSafe for MessageFragmenter
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<Tail, T> Prepend<T> for Tail
impl<Tail, T> Prepend<T> for Tail
§type PreprendResult = Tail
type PreprendResult = Tail
The Resulting [
TupleList
], of an [Prepend::prepend()
] call,
including the prepended entry.