Struct rosetta_types::block_event::BlockEvent
source · pub struct BlockEvent {
pub sequence: i64,
pub block_identifier: BlockIdentifier,
pub type: BlockEventType,
}
Expand description
BlockEvent : BlockEvent represents the addition or removal of a BlockIdentifier from storage. Streaming BlockEvents allows lightweight clients to update their own state without needing to implement their own syncing logic.
Fields§
§sequence: i64
sequence is the unique identifier of a BlockEvent within the context of a NetworkIdentifier.
block_identifier: BlockIdentifier
§type: BlockEventType
Implementations§
source§impl BlockEvent
impl BlockEvent
sourcepub fn new(
sequence: i64,
block_identifier: BlockIdentifier,
type: BlockEventType
) -> BlockEvent
pub fn new( sequence: i64, block_identifier: BlockIdentifier, type: BlockEventType ) -> BlockEvent
BlockEvent represents the addition or removal of a BlockIdentifier from storage. Streaming BlockEvents allows lightweight clients to update their own state without needing to implement their own syncing logic.
Trait Implementations§
source§impl Clone for BlockEvent
impl Clone for BlockEvent
source§fn clone(&self) -> BlockEvent
fn clone(&self) -> BlockEvent
Returns a copy 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 BlockEvent
impl Debug for BlockEvent
source§impl Default for BlockEvent
impl Default for BlockEvent
source§fn default() -> BlockEvent
fn default() -> BlockEvent
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for BlockEvent
impl<'de> Deserialize<'de> for BlockEvent
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq<BlockEvent> for BlockEvent
impl PartialEq<BlockEvent> for BlockEvent
source§fn eq(&self, other: &BlockEvent) -> bool
fn eq(&self, other: &BlockEvent) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for BlockEvent
impl Serialize for BlockEvent
impl Eq for BlockEvent
impl StructuralEq for BlockEvent
impl StructuralPartialEq for BlockEvent
Auto Trait Implementations§
impl RefUnwindSafe for BlockEvent
impl Send for BlockEvent
impl Sync for BlockEvent
impl Unpin for BlockEvent
impl UnwindSafe for BlockEvent
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