Trait bip_utracker::option::AnnounceOption
[−]
[src]
pub trait AnnounceOption<'a>: Sized { fn option_byte() -> u8; fn option_length(&self) -> usize; fn read_option(bytes: &'a [u8]) -> Option<Self>; fn write_option(&self, buffer: &mut [u8]); }
Trait for supplying optional information in an AnnounceRequest.
Required Methods
fn option_byte() -> u8
Byte specifying what option this is.
fn option_length(&self) -> usize
Length of the associated option data.
fn read_option(bytes: &'a [u8]) -> Option<Self>
Reads the option content from the given bytes.
fn write_option(&self, buffer: &mut [u8])
Writes the option payload into the given buffer.
Implementors
impl<'a> AnnounceOption<'a> for URLDataOption<'a>