Struct stun_rs::MessageDecoder
source · [−]pub struct MessageDecoder { /* private fields */ }Expand description
Class used to decode STUN messages
Implementations
sourceimpl MessageDecoder
impl MessageDecoder
sourcepub fn decode(
&self,
buffer: &[u8]
) -> Result<(StunMessage, usize), StunDecodeError>
pub fn decode(
&self,
buffer: &[u8]
) -> Result<(StunMessage, usize), StunDecodeError>
Decodes the STUN raw buffer
Arguments:
buffer- Raw buffer containing the STUN message
Returns:
A tuple with StunMessage itself and the size consumed to decode the message,
or an error describing the problem if the message could not be decoded.
sourcepub fn get_context(&self) -> Option<&DecoderContext>
pub fn get_context(&self) -> Option<&DecoderContext>
Gets the context associated to this decoder
Trait Implementations
sourceimpl Debug for MessageDecoder
impl Debug for MessageDecoder
sourceimpl Default for MessageDecoder
impl Default for MessageDecoder
sourcefn default() -> MessageDecoder
fn default() -> MessageDecoder
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl RefUnwindSafe for MessageDecoder
impl !Send for MessageDecoder
impl !Sync for MessageDecoder
impl Unpin for MessageDecoder
impl UnwindSafe for MessageDecoder
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more