Struct bitcoin_peerman::announcement::TimeKey
source · pub struct TimeKey(pub WaitState, pub OffsetDateTime);Expand description
| The ByTime index is sorted by (wait_state, | time). | | All announcements with a timestamp in the | future can be found by iterating the index | forward from the beginning. | | All announcements with a timestamp in the past | can be found by iterating the index backwards | from the end. | | Uses: | | * Finding CANDIDATE_DELAYED announcements whose | reqtime has passed, and REQUESTED | announcements whose expiry has passed. | | * Finding CANDIDATE_READY/BEST announcements | whose reqtime is in the future (when the clock | time went backwards).
Tuple Fields§
§0: WaitState§1: OffsetDateTimeTrait Implementations§
source§impl From<&Announcement> for TimeKey
impl From<&Announcement> for TimeKey
source§fn from(ann: &Announcement) -> Self
fn from(ann: &Announcement) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl RefUnwindSafe for TimeKey
impl Send for TimeKey
impl Sync for TimeKey
impl Unpin for TimeKey
impl UnwindSafe for TimeKey
Blanket Implementations§
§impl<T, U> CastInto<U> for Twhere
U: CastFrom<T>,
impl<T, U> CastInto<U> for Twhere U: CastFrom<T>,
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> StaticUpcast<T> for T
impl<T> StaticUpcast<T> for T
§unsafe fn static_upcast(ptr: Ptr<T>) -> Ptr<T>
unsafe fn static_upcast(ptr: Ptr<T>) -> Ptr<T>
Convert type of a const pointer. Read more