pub struct RollbackGuard {
pub slot_number: u64,
pub timestamp: i64,
pub blockhash: Hash,
pub first_slot_number: u64,
pub first_previous_blockhash: Hash,
}Expand description
Reorg guard attached to query responses: the server’s current in-memory head window (its last block, plus the first slot of the window and that slot’s parent hash), so a consumer can detect a fork and unwind before committing. Absent when the server has no complete window to describe.
Shape mirrors the EVM RollbackGuard field-for-field with Solana naming
(slot_number vs block_number, blockhash vs hash,
first_previous_blockhash vs first_parent_hash).
Fields§
§slot_number: u64The last slot in the server’s in-memory window.
timestamp: i64Timestamp of the last block.
blockhash: HashBlockhash of the last block.
first_slot_number: u64The first slot in the server’s in-memory window.
first_previous_blockhash: HashPrevious blockhash of the first block in the window.
Trait Implementations§
Source§impl Clone for RollbackGuard
impl Clone for RollbackGuard
Source§fn clone(&self) -> RollbackGuard
fn clone(&self) -> RollbackGuard
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 RollbackGuard
impl Debug for RollbackGuard
Source§impl<'de> Deserialize<'de> for RollbackGuard
impl<'de> Deserialize<'de> for RollbackGuard
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<RollbackGuard, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<RollbackGuard, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for RollbackGuard
Source§impl PartialEq for RollbackGuard
impl PartialEq for RollbackGuard
Source§impl Serialize for RollbackGuard
impl Serialize for RollbackGuard
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,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for RollbackGuard
Auto Trait Implementations§
impl Freeze for RollbackGuard
impl RefUnwindSafe for RollbackGuard
impl Send for RollbackGuard
impl Sync for RollbackGuard
impl Unpin for RollbackGuard
impl UnsafeUnpin for RollbackGuard
impl UnwindSafe for RollbackGuard
Blanket Implementations§
impl<T> Allocation for T
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,
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
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.