Enum bip_handshake::Protocol
[−]
[src]
pub enum Protocol { BitTorrent, Custom(Vec<u8>), }
Protocol
information transmitted as part of the handshake.
Variants
BitTorrent
Custom(Vec<u8>)
Methods
impl Protocol
[src]
fn from_bytes(bytes: &[u8]) -> IResult<&[u8], Protocol>
Create a Protocol
from the given bytes.
fn write_bytes<W>(&self, writer: W) -> Result<()> where W: Write
Write the Protocol
out to the given writer.
fn write_len(&self) -> usize
Get the legth of the given protocol (does not include the length byte).
Trait Implementations
impl Clone for Protocol
[src]
fn clone(&self) -> Protocol
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl PartialEq for Protocol
[src]
fn eq(&self, __arg_0: &Protocol) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Protocol) -> bool
This method tests for !=
.