Struct bip_disk::BlockMetadata
[−]
[src]
pub struct BlockMetadata { /* fields omitted */ }
BlockMetadata
which tracks metadata associated with a Block
of memory.
Methods
impl BlockMetadata
[src]
fn new(
info_hash: InfoHash,
piece_index: u64,
block_offset: u64,
block_length: usize
) -> BlockMetadata
info_hash: InfoHash,
piece_index: u64,
block_offset: u64,
block_length: usize
) -> BlockMetadata
fn with_default_hash(
piece_index: u64,
block_offset: u64,
block_length: usize
) -> BlockMetadata
piece_index: u64,
block_offset: u64,
block_length: usize
) -> BlockMetadata
fn info_hash(&self) -> InfoHash
fn piece_index(&self) -> u64
fn block_offset(&self) -> u64
fn block_length(&self) -> usize
Trait Implementations
impl Copy for BlockMetadata
[src]
impl Clone for BlockMetadata
[src]
fn clone(&self) -> BlockMetadata
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 Hash for BlockMetadata
[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl PartialEq for BlockMetadata
[src]
fn eq(&self, __arg_0: &BlockMetadata) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &BlockMetadata) -> bool
This method tests for !=
.
impl Eq for BlockMetadata
[src]
impl Debug for BlockMetadata
[src]
impl Default for BlockMetadata
[src]
fn default() -> BlockMetadata
Returns the "default value" for a type. Read more