pub struct PodEpochSchedule { /* private fields */ }Expand description
Pod (Plain Old Data) representation of EpochSchedule with no padding.
This type can be safely loaded via sol_get_sysvar without undefined behavior.
Provides performant zero-copy accessors as an alternative to the EpochSchedule type.
Implementations§
Source§impl PodEpochSchedule
impl PodEpochSchedule
Sourcepub fn fetch() -> Result<PodEpochSchedule, ProgramError>
pub fn fetch() -> Result<PodEpochSchedule, ProgramError>
Fetch the sysvar data using the sol_get_sysvar syscall.
This provides an alternative to EpochSchedule which provides zero-copy accessors.
pub fn slots_per_epoch(&self) -> u64
pub fn leader_schedule_slot_offset(&self) -> u64
pub fn warmup(&self) -> bool
pub fn first_normal_epoch(&self) -> u64
pub fn first_normal_slot(&self) -> u64
Trait Implementations§
Source§impl Clone for PodEpochSchedule
impl Clone for PodEpochSchedule
Source§fn clone(&self) -> PodEpochSchedule
fn clone(&self) -> PodEpochSchedule
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PodEpochSchedule
impl Debug for PodEpochSchedule
Source§impl From<PodEpochSchedule> for EpochSchedule
impl From<PodEpochSchedule> for EpochSchedule
Source§fn from(pod: PodEpochSchedule) -> EpochSchedule
fn from(pod: PodEpochSchedule) -> EpochSchedule
Converts to this type from the input type.
Source§impl PartialEq for PodEpochSchedule
impl PartialEq for PodEpochSchedule
impl Copy for PodEpochSchedule
impl Eq for PodEpochSchedule
impl StructuralPartialEq for PodEpochSchedule
Auto Trait Implementations§
impl Freeze for PodEpochSchedule
impl RefUnwindSafe for PodEpochSchedule
impl Send for PodEpochSchedule
impl Sync for PodEpochSchedule
impl Unpin for PodEpochSchedule
impl UnsafeUnpin for PodEpochSchedule
impl UnwindSafe for PodEpochSchedule
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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>
Converts
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>
Converts
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