pub struct HFsInfo(/* private fields */);Expand description
Information about every hard-fork Monero has had.
Implementations§
Source§impl HFsInfo
impl HFsInfo
pub const fn info_for_hf(&self, hf: &HardFork) -> HFInfo
pub const fn new(hfs: [HFInfo; 16]) -> Self
Sourcepub const fn hard_fork_state(&self, current_time: u64) -> HardForkState
pub const fn hard_fork_state(&self, current_time: u64) -> HardForkState
Returns the hard-fork state based on the current time.
Mirrors HardFork::get_state() in monerod:
HardForkState::LikelyForked: more than one year past the last scheduled fork time.HardForkState::UpdateNeeded: more than six months past the last scheduled fork time.HardForkState::Ready: within six months of the last scheduled fork time.
Sourcepub const fn main_net() -> Self
pub const fn main_net() -> Self
Returns the main-net hard-fork information.
ref: https://monero-book.cuprate.org/consensus_rules/hardforks.html#Mainnet-Hard-Forks
Sourcepub const fn test_net() -> Self
pub const fn test_net() -> Self
Returns the test-net hard-fork information.
ref: https://monero-book.cuprate.org/consensus_rules/hardforks.html#Testnet-Hard-Forks
Sourcepub const fn fake_chain() -> Self
pub const fn fake_chain() -> Self
Returns the fake-chain (regtest) hard-fork information.
Sourcepub const fn stage_net() -> Self
pub const fn stage_net() -> Self
Returns the stagenet hard-fork information.
ref: https://monero-book.cuprate.org/consensus_rules/hardforks.html#Stagenet-Hard-Forks
Trait Implementations§
impl Copy for HFsInfo
impl Eq for HFsInfo
impl StructuralPartialEq for HFsInfo
Auto Trait Implementations§
impl Freeze for HFsInfo
impl RefUnwindSafe for HFsInfo
impl Send for HFsInfo
impl Sync for HFsInfo
impl Unpin for HFsInfo
impl UnsafeUnpin for HFsInfo
impl UnwindSafe for HFsInfo
Blanket Implementations§
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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 more§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 384 bytes