Skip to main content

IncomingAssemblyTable

Trait IncomingAssemblyTable 

Source
pub trait IncomingAssemblyTable {
    // Required methods
    fn capacity(&self) -> usize;
    fn len(&self) -> usize;
    fn link_ids(&self) -> &[LinkId];
    fn original_hashes(&self) -> &[ResourceHash];
    fn total_segments(&self) -> &[u64];
    fn segments_received(&self) -> &[u64];
    fn received_totals(&self) -> &[u64];
    fn push(
        &mut self,
        link_id: LinkId,
        original_hash: ResourceHash,
        total_segments: u64,
    );
    fn set_progress(
        &mut self,
        index: usize,
        segments_received: u64,
        received_total: u64,
    );
    fn swap_remove(&mut self, index: usize);

    // Provided method
    fn is_empty(&self) -> bool { ... }
}

Required Methods§

Source

fn capacity(&self) -> usize

Source

fn len(&self) -> usize

Source

fn original_hashes(&self) -> &[ResourceHash]

Source

fn total_segments(&self) -> &[u64]

Source

fn segments_received(&self) -> &[u64]

Source

fn received_totals(&self) -> &[u64]

Source

fn push( &mut self, link_id: LinkId, original_hash: ResourceHash, total_segments: u64, )

Source

fn set_progress( &mut self, index: usize, segments_received: u64, received_total: u64, )

Source

fn swap_remove(&mut self, index: usize)

Provided Methods§

Source

fn is_empty(&self) -> bool

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl IncomingAssemblyTable for HeapIncomingAssemblyTable

Source§

impl<const MAX_INCOMING_ASSEMBLIES: usize> IncomingAssemblyTable for FixedIncomingAssemblyTable<MAX_INCOMING_ASSEMBLIES>