Struct bip_utracker::option::AnnounceOptions
[−]
[src]
pub struct AnnounceOptions<'a> { /* fields omitted */ }
Set of announce options used to provide trackers with extra information.
Methods
impl<'a> AnnounceOptions<'a>
[src]
fn new() -> AnnounceOptions<'a>
[src]
Create a new set of AnnounceOptions.
fn from_bytes(bytes: &'a [u8]) -> IResult<&'a [u8], AnnounceOptions<'a>>
[src]
Parse a set of AnnounceOptions from the given bytes.
fn write_bytes<W>(&self, writer: W) -> Result<()> where
W: Write,
[src]
W: Write,
Write the AnnounceOptions to the given writer.
fn get<O>(&'a self) -> Option<O> where
O: AnnounceOption<'a>,
[src]
O: AnnounceOption<'a>,
Search for and construct the given AnnounceOption from the current AnnounceOptions.
Returns None if the option is not found or it failed to read from the given bytes.
fn insert<O>(&mut self, option: &O) where
O: AnnounceOption<'a>,
[src]
O: AnnounceOption<'a>,
Add an AnnounceOption to the current set of AnnounceOptions.
Any existing option with a matching option byte will be replaced.
fn to_owned(&self) -> AnnounceOptions<'static>
[src]
Create an owned version of AnnounceOptions.
Trait Implementations
impl<'a> Clone for AnnounceOptions<'a>
[src]
fn clone(&self) -> AnnounceOptions<'a>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<'a> Debug for AnnounceOptions<'a>
[src]
impl<'a> PartialEq for AnnounceOptions<'a>
[src]
fn eq(&self, __arg_0: &AnnounceOptions<'a>) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &AnnounceOptions<'a>) -> bool
[src]
This method tests for !=
.