pub struct LimitedSizePacketBuilder {
pub limit: usize,
}
Expand description
A PacketBuilder
which has no header or footer, but which imposes a
maximum body length constraint.
LimitedSizePacketBuilder
s are constructed using the
Serializer::with_size_limit
method.
Fields§
§limit: usize
The maximum body length.
Trait Implementations§
Source§impl Clone for LimitedSizePacketBuilder
impl Clone for LimitedSizePacketBuilder
Source§fn clone(&self) -> LimitedSizePacketBuilder
fn clone(&self) -> LimitedSizePacketBuilder
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for LimitedSizePacketBuilder
impl Debug for LimitedSizePacketBuilder
Source§impl PacketBuilder for LimitedSizePacketBuilder
impl PacketBuilder for LimitedSizePacketBuilder
Source§fn constraints(&self) -> PacketConstraints
fn constraints(&self) -> PacketConstraints
Gets the constraints for this
PacketBuilder
.Source§fn serialize(
&self,
_target: &mut SerializeTarget<'_>,
_body: FragmentedBytesMut<'_, '_>,
)
fn serialize( &self, _target: &mut SerializeTarget<'_>, _body: FragmentedBytesMut<'_, '_>, )
Serializes this packet into an existing buffer. Read more
impl Copy for LimitedSizePacketBuilder
Auto Trait Implementations§
impl Freeze for LimitedSizePacketBuilder
impl RefUnwindSafe for LimitedSizePacketBuilder
impl Send for LimitedSizePacketBuilder
impl Sync for LimitedSizePacketBuilder
impl Unpin for LimitedSizePacketBuilder
impl UnwindSafe for LimitedSizePacketBuilder
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)