Struct bip_peer::messages::RequestMessage
[−]
[src]
pub struct RequestMessage { /* fields omitted */ }
Message for requesting a block from a peer.
Methods
impl RequestMessage
[src]
fn new(
piece_index: u32,
block_offset: u32,
block_length: usize
) -> RequestMessage
[src]
piece_index: u32,
block_offset: u32,
block_length: usize
) -> RequestMessage
fn parse_bytes(_input: (), bytes: Bytes) -> IResult<(), Result<RequestMessage>>
[src]
fn write_bytes<W>(&self, writer: W) -> Result<()> where
W: Write,
[src]
W: Write,
fn piece_index(&self) -> u32
[src]
fn block_offset(&self) -> u32
[src]
fn block_length(&self) -> usize
[src]
Trait Implementations
impl Copy for RequestMessage
[src]
impl Clone for RequestMessage
[src]
fn clone(&self) -> RequestMessage
[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 Debug for RequestMessage
[src]
impl Hash for RequestMessage
[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)
[src]
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl PartialEq for RequestMessage
[src]
fn eq(&self, __arg_0: &RequestMessage) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &RequestMessage) -> bool
[src]
This method tests for !=
.