pub struct DecoderContextBuilder(/* private fields */);
Expand description
Builder class used to construct DecoderContext
objects
Implementations§
source§impl DecoderContextBuilder
impl DecoderContextBuilder
sourcepub fn with_key(self, key: HMACKey) -> Self
pub fn with_key(self, key: HMACKey) -> Self
Configure the builder to use a key to decode messages
sourcepub fn with_validation(self) -> Self
pub fn with_validation(self) -> Self
Whether this decoder will validate attributes.
sourcepub fn with_unknown_data(self) -> Self
pub fn with_unknown_data(self) -> Self
If raw data belonging to unknown attributes must be stored. When this option is enabled, the Unknown attribute will keep the raw data value whenever an unknown attribute is decoded.
sourcepub fn not_ignore(self) -> Self
pub fn not_ignore(self) -> Self
If agents should ignore attributes that follow MESSAGE-INTEGRITY, with the exception of the MESSAGE-INTEGRITY-SHA256 and FINGERPRINT attributes. STUN states that agents MUST ignore those attributes, use this flag if you want to change this behavior: to decode all attributes event if they follow one of the above mentioned attributes.
sourcepub fn build(self) -> DecoderContext
pub fn build(self) -> DecoderContext
Builds a DecoderContext
Trait Implementations§
source§impl Debug for DecoderContextBuilder
impl Debug for DecoderContextBuilder
source§impl Default for DecoderContextBuilder
impl Default for DecoderContextBuilder
source§fn default() -> DecoderContextBuilder
fn default() -> DecoderContextBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for DecoderContextBuilder
impl RefUnwindSafe for DecoderContextBuilder
impl !Send for DecoderContextBuilder
impl !Sync for DecoderContextBuilder
impl Unpin for DecoderContextBuilder
impl UnwindSafe for DecoderContextBuilder
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