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
impl ArqBounds
sourcepub fn equivalent(topo: &Topology, a: &Self, b: &Self) -> bool
pub fn equivalent(topo: &Topology, a: &Self, b: &Self) -> bool
The two arqs represent the same interval despite having potentially different terms
sourcepub fn from_interval_rounded(
topo: &Topology,
power: u8,
interval: DhtArcRange
) -> (Self, bool)
pub fn from_interval_rounded( topo: &Topology, power: u8, interval: DhtArcRange ) -> (Self, bool)
Return the ArqBounds which most closely matches the given DhtArcRange
sourcepub fn from_interval(
topo: &Topology,
power: u8,
interval: DhtArcRange
) -> Option<Self>
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.
sourcepub fn to_arq<F: FnOnce(Loc) -> Loc>(&self, topo: &Topology, f: F) -> Arq
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
sourcepub fn segments(&self) -> impl Iterator<Item = SpaceSegment> + '_
pub fn segments(&self) -> impl Iterator<Item = SpaceSegment> + '_
Iterate over each segment (chunk) in the Arq
sourcepub fn offset(&self) -> SpaceOffset
pub fn offset(&self) -> SpaceOffset
Get a reference to the arq bounds’s offset.