Skip to main content

UpstreamAppDestinationTable

Trait UpstreamAppDestinationTable 

Source
pub trait UpstreamAppDestinationTable {
    // Required methods
    fn capacity(&self) -> usize;
    fn len(&self) -> usize;
    fn destinations(&self) -> &[DestinationHash];
    fn kinds(&self) -> &[UpstreamAppDestinationKind];
    fn name_hashes(&self) -> &[DottedNameHash];
    fn app_data_at(&self, index: usize) -> Option<&[u8]>;
    fn kind_mut(&mut self, index: usize) -> &mut UpstreamAppDestinationKind;
    fn upsert(
        &mut self,
        destination: DestinationHash,
        kind: UpstreamAppDestinationKind,
        name_hash: DottedNameHash,
        app_data: Vec<u8, prns_core::::routing::announce::emit::AnnounceAppDataBytes::{constant#0}>,
    ) -> Result<usize, TablePushError>;

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

Required Methods§

Source

fn capacity(&self) -> usize

Source

fn len(&self) -> usize

Source

fn destinations(&self) -> &[DestinationHash]

Source

fn kinds(&self) -> &[UpstreamAppDestinationKind]

Source

fn name_hashes(&self) -> &[DottedNameHash]

Source

fn app_data_at(&self, index: usize) -> Option<&[u8]>

Source

fn kind_mut(&mut self, index: usize) -> &mut UpstreamAppDestinationKind

Source

fn upsert( &mut self, destination: DestinationHash, kind: UpstreamAppDestinationKind, name_hash: DottedNameHash, app_data: Vec<u8, prns_core::::routing::announce::emit::AnnounceAppDataBytes::{constant#0}>, ) -> Result<usize, TablePushError>

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§