Type Definition kitsune_p2p_dht::arq::ArqBounds

source ·
pub type ArqBounds = Arq<SpaceOffset>;
Expand description

Alias for Arq with an SpaceOffset start

Implementations§

source§

impl ArqBounds

source

pub fn equivalent(topo: &Topology, a: &Self, b: &Self) -> bool

The two arqs represent the same interval despite having potentially different terms

source

pub fn from_interval_rounded( topo: &Topology, power: u8, interval: DhtArcRange ) -> (Self, bool)

Return the ArqBounds which most closely matches the given DhtArcRange

source

pub fn from_interval( topo: &Topology, power: u8, interval: DhtArcRange ) -> Option<Self>

Return the ArqBounds which is equivalent to the given DhtArcRange if it exists.

source

pub fn to_arq<F: FnOnce(Loc) -> Loc>(&self, topo: &Topology, f: F) -> Arq

Upcast this ArqBounds to an Arq that has knowledge of its Loc

source

pub fn empty(topo: &Topology, power: u8) -> Self

An arbitrary zero-coverage arq.

source

pub fn segments(&self) -> impl Iterator<Item = SpaceSegment> + '_

Iterate over each segment (chunk) in the Arq

source

pub fn offset(&self) -> SpaceOffset

Get a reference to the arq bounds’s offset.

Trait Implementations§

source§

impl From<&Arq<SpaceOffset>> for ArqBounds

source§

fn from(a: &ArqBounds) -> Self

Converts to this type from the input type.