pub struct EncoderContextBuilder(/* private fields */);
Expand description
Builder class used to construct EncoderContext
objects
Implementations§
source§impl EncoderContextBuilder
impl EncoderContextBuilder
sourcepub fn with_custom_padding(self, padding: StunPadding) -> Self
pub fn with_custom_padding(self, padding: StunPadding) -> Self
Configure the STUN context to use a custom padding. The STUN
specification states that the padding bits MUST be set
to zero on sending and MUST be ignored by the receiver.
Nevertheless, it could be useful to use a custom padding
for debugging purposes. For example, the STUN Test Vectors
RFC5769
uses buffers with non zero padding and we can set this
feature on to check that buffers generated by the library
are identical when they are compared byte to byte.
sourcepub fn build(self) -> EncoderContext
pub fn build(self) -> EncoderContext
Builds a EncoderContext
Trait Implementations§
source§impl Debug for EncoderContextBuilder
impl Debug for EncoderContextBuilder
source§impl Default for EncoderContextBuilder
impl Default for EncoderContextBuilder
source§fn default() -> EncoderContextBuilder
fn default() -> EncoderContextBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for EncoderContextBuilder
impl RefUnwindSafe for EncoderContextBuilder
impl Send for EncoderContextBuilder
impl Sync for EncoderContextBuilder
impl Unpin for EncoderContextBuilder
impl UnwindSafe for EncoderContextBuilder
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