pub enum EntryKind {
Data,
RelayMessage,
}Expand description
DHT storage entry categories.
Variants§
Data
Application elements stored in the DHT, each as its bytes.
RelayMessage
A relay inbox: messages held for an offline peer (see the inbox module).
Implementations§
Source§impl EntryKind
impl EntryKind
Sourcepub const fn default_lifetime_ms(self) -> u64
pub const fn default_lifetime_ms(self) -> u64
Retention stamped at the operation boundary when the origin left it absent.
Sourcepub const fn max_lifetime_ms(self) -> u64
pub const fn max_lifetime_ms(self) -> u64
The longest retention a receiver admits for this kind.
Sourcepub const fn element_horizon_ms(self) -> Option<u64>
pub const fn element_horizon_ms(self) -> Option<u64>
The dot horizon H: how long after its dot’s issue time an add of this kind may be held
anywhere, or None for a kind whose elements retire otherwise.
A data element lives at most the longest retention one write may request, so writing a
value again (which issues a fresh dot) is what keeps it. A relay element has no dot
horizon: it retires by its signed hold instant instead, the hold horizon
inbox::RELAY_HOLD_HORIZON_MS, which a rewrite under a fresh dot cannot extend.
Source§impl EntryKind
impl EntryKind
Sourcepub const fn max_data_len(self) -> usize
pub const fn max_data_len(self) -> usize
The greatest number of visible elements a carrier of this kind keeps; when the cap binds, the oldest elements are the ones dropped.
Sourcepub const fn is_relay_inbox(self) -> bool
pub const fn is_relay_inbox(self) -> bool
Whether this kind is a relay inbox.
Sourcepub const fn replication(self, requested: u16) -> u16
pub const fn replication(self, requested: u16) -> u16
The affine placements a carrier of this kind gets when requested is configured: a relay
inbox has one placement, its key, and is replicated to the members of that key instead
(dht::relay_holder, #777), never to affine rotations.
Sourcepub const fn tombstone_bound(self) -> TombstoneBound
pub const fn tombstone_bound(self) -> TombstoneBound
How a carrier of this kind bounds its removes (removal-stability paper, Law 5 and Prop. 3).
A data topic refuses past DATA_TOMBSTONE_MAX_LEN and never truncates: a dropped
tombstone could be one whose add is still inside its element horizon at another replica,
which would then resurrect it; a refused write drops nothing. A relay inbox keeps the
newest RELAY_INBOX_MAX_LEN removals: a lagging member (#777) may still resurrect an
element whose removal fell off the cap, and its redelivery is refused by the recipient’s
receiver window and retired again, so the cap costs a redelivery, never a duplicate
dispatch.
Trait Implementations§
impl Copy for EntryKind
Source§impl<'de> Deserialize<'de> for EntryKind
impl<'de> Deserialize<'de> for EntryKind
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<EntryKind, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<EntryKind, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Eq for EntryKind
Source§impl Ord for EntryKind
impl Ord for EntryKind
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialOrd for EntryKind
impl PartialOrd for EntryKind
Source§impl Serialize for EntryKind
impl Serialize for EntryKind
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for EntryKind
Auto Trait Implementations§
impl Forget for EntryKind
impl Freeze for EntryKind
impl Move for EntryKind
impl RefUnwindSafe for EntryKind
impl Send for EntryKind
impl Sync for EntryKind
impl Unpin for EntryKind
impl UnsafeUnpin for EntryKind
impl UnwindSafe for EntryKind
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
impl<T> ErasedDestructor for Twhere
T: 'static,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
impl<T> MaybeSend for T
impl<T> MaybeSendSync for T
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.