pub enum UdpTrackerOption {
EndOfOptions,
Nop,
UrlData(String),
Unknown {
option_type: u8,
data: Vec<u8>,
},
}Expand description
BEP 41: UDP tracker protocol extension option.
Options appear as TLV (Type-Length-Value) entries after the peer list in a UDP announce response. Types 0x00 and 0x01 are single-byte (no length field). Types 0x02..0x7F use a 1-byte length. Types 0x80..0xFF use a 2-byte big-endian length.
Variants§
EndOfOptions
End of options marker (type 0x00).
Nop
No operation / padding (type 0x01).
UrlData(String)
URL data from tracker (type 0x02).
Unknown
Unknown extension type (forward compatible).
Trait Implementations§
Source§impl Clone for UdpTrackerOption
impl Clone for UdpTrackerOption
Source§fn clone(&self) -> UdpTrackerOption
fn clone(&self) -> UdpTrackerOption
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 UdpTrackerOption
impl Debug for UdpTrackerOption
Source§impl PartialEq for UdpTrackerOption
impl PartialEq for UdpTrackerOption
Source§fn eq(&self, other: &UdpTrackerOption) -> bool
fn eq(&self, other: &UdpTrackerOption) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for UdpTrackerOption
impl StructuralPartialEq for UdpTrackerOption
Auto Trait Implementations§
impl Freeze for UdpTrackerOption
impl RefUnwindSafe for UdpTrackerOption
impl Send for UdpTrackerOption
impl Sync for UdpTrackerOption
impl Unpin for UdpTrackerOption
impl UnsafeUnpin for UdpTrackerOption
impl UnwindSafe for UdpTrackerOption
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