Struct tulipv2_sdk_common::lending::last_update::LastUpdate
source · [−]Expand description
Last update state
Fields
slot: SlotLast slot when updated
stale: boolTrue when marked stale, false when slot updated
Implementations
sourceimpl LastUpdate
impl LastUpdate
sourcepub fn slots_elapsed(&self, slot: Slot) -> Result<u64, ProgramError>
pub fn slots_elapsed(&self, slot: Slot) -> Result<u64, ProgramError>
Return slots elapsed since given slot
sourcepub fn update_slot(&mut self, slot: Slot)
pub fn update_slot(&mut self, slot: Slot)
Set last update slot
sourcepub fn mark_stale(&mut self)
pub fn mark_stale(&mut self)
Set stale to true
Trait Implementations
sourceimpl Clone for LastUpdate
impl Clone for LastUpdate
sourcefn clone(&self) -> LastUpdate
fn clone(&self) -> LastUpdate
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresourceimpl Debug for LastUpdate
impl Debug for LastUpdate
sourceimpl Default for LastUpdate
impl Default for LastUpdate
sourcefn default() -> LastUpdate
fn default() -> LastUpdate
Returns the “default value” for a type. Read more
sourceimpl PartialEq<LastUpdate> for LastUpdate
impl PartialEq<LastUpdate> for LastUpdate
sourceimpl PartialOrd<LastUpdate> for LastUpdate
impl PartialOrd<LastUpdate> for LastUpdate
sourcefn partial_cmp(&self, other: &Self) -> Option<Ordering>
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moreAuto Trait Implementations
impl RefUnwindSafe for LastUpdate
impl Send for LastUpdate
impl Sync for LastUpdate
impl Unpin for LastUpdate
impl UnwindSafe for LastUpdate
Blanket Implementations
impl<T> AbiExample for T
impl<T> AbiExample for T
default fn example() -> T
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more