Enum stun_codec::rfc5766::AttributeDecoder
source · pub enum AttributeDecoder {
ChannelNumber(<ChannelNumber as Attribute>::Decoder),
Lifetime(<Lifetime as Attribute>::Decoder),
XorPeerAddress(<XorPeerAddress as Attribute>::Decoder),
Data(<Data as Attribute>::Decoder),
XorRelayAddress(<XorRelayAddress as Attribute>::Decoder),
EvenPort(<EvenPort as Attribute>::Decoder),
RequestedTransport(<RequestedTransport as Attribute>::Decoder),
DontFragment(<DontFragment as Attribute>::Decoder),
ReservationToken(<ReservationToken as Attribute>::Decoder),
None,
}
Expand description
Attribute set decoder.
Variants§
ChannelNumber(<ChannelNumber as Attribute>::Decoder)
Lifetime(<Lifetime as Attribute>::Decoder)
XorPeerAddress(<XorPeerAddress as Attribute>::Decoder)
Data(<Data as Attribute>::Decoder)
XorRelayAddress(<XorRelayAddress as Attribute>::Decoder)
EvenPort(<EvenPort as Attribute>::Decoder)
RequestedTransport(<RequestedTransport as Attribute>::Decoder)
DontFragment(<DontFragment as Attribute>::Decoder)
ReservationToken(<ReservationToken as Attribute>::Decoder)
None
Implementations§
Trait Implementations§
source§impl Debug for AttributeDecoder
impl Debug for AttributeDecoder
source§impl Decode for AttributeDecoder
impl Decode for AttributeDecoder
source§fn decode(&mut self, buf: &[u8], eos: Eos) -> Result<usize>
fn decode(&mut self, buf: &[u8], eos: Eos) -> Result<usize>
Consumes the given buffer (a part of a byte sequence), and proceeds the decoding process. Read more
source§fn finish_decoding(&mut self) -> Result<Self::Item>
fn finish_decoding(&mut self) -> Result<Self::Item>
Finishes the current decoding process and returns the decoded item. Read more
source§fn requiring_bytes(&self) -> ByteCount
fn requiring_bytes(&self) -> ByteCount
Returns the lower bound of the number of bytes needed to decode the next item. Read more
source§impl Default for AttributeDecoder
impl Default for AttributeDecoder
source§impl TryTaggedDecode for AttributeDecoder
impl TryTaggedDecode for AttributeDecoder
§type Tag = AttributeType
type Tag = AttributeType
The type of tags prefixed to the items to be decoded.
Auto Trait Implementations§
impl Freeze for AttributeDecoder
impl RefUnwindSafe for AttributeDecoder
impl Send for AttributeDecoder
impl Sync for AttributeDecoder
impl Unpin for AttributeDecoder
impl UnwindSafe for AttributeDecoder
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> DecodeExt for Twhere
T: Decode,
impl<T> DecodeExt for Twhere
T: Decode,
source§fn map<T, F>(self, f: F) -> Map<Self, T, F>
fn map<T, F>(self, f: F) -> Map<Self, T, F>
Creates a decoder that converts decoded values by calling the given function. Read more
source§fn try_map<T, E, F>(self, f: F) -> TryMap<Self, T, E, F>
fn try_map<T, E, F>(self, f: F) -> TryMap<Self, T, E, F>
Creates a decoder that tries to convert decoded values by calling the given function. Read more
source§fn map_err<E, F>(self, f: F) -> MapErr<Self, E, F>
fn map_err<E, F>(self, f: F) -> MapErr<Self, E, F>
Creates a decoder for modifying decoding errors produced by
self
. Read moresource§fn and_then<D, F>(self, f: F) -> AndThen<Self, D, F>
fn and_then<D, F>(self, f: F) -> AndThen<Self, D, F>
Creates a decoder that enables conditional decoding. Read more
source§fn collect<T>(self) -> Collect<Self, T>
fn collect<T>(self) -> Collect<Self, T>
Creates a decoder for collecting decoded items. Read more
source§fn length(self, expected_bytes: u64) -> Length<Self>
fn length(self, expected_bytes: u64) -> Length<Self>
Creates a decoder that consumes the specified number of bytes exactly. Read more
source§fn omit(self, do_omit: bool) -> Omittable<Self>
fn omit(self, do_omit: bool) -> Omittable<Self>
Creates a decoder that will omit decoding items if
do_omit = true
is specified. Read moresource§fn max_bytes(self, bytes: u64) -> MaxBytes<Self>
fn max_bytes(self, bytes: u64) -> MaxBytes<Self>
Creates a decoder that will fail if the number of consumed bytes exceeds
bytes
. Read moresource§fn chain<T>(self, other: T) -> TupleDecoder<(Self, T)>where
T: Decode,
fn chain<T>(self, other: T) -> TupleDecoder<(Self, T)>where
T: Decode,
Takes two decoders and creates a new decoder that decodes both items in sequence. Read more
source§fn slice(self) -> Slice<Self>
fn slice(self) -> Slice<Self>
Creates a decoder that makes it possible to slice the input byte sequence in arbitrary units. Read more
source§fn peekable(self) -> Peekable<Self>
fn peekable(self) -> Peekable<Self>
Creates a decoder that enables to peek decoded items before calling
finish_decoding
method. Read more