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: i64sequence is the unique identifier of a BlockEvent within the context of a NetworkIdentifier.
block_identifier: BlockIdentifier§type: BlockEventTypeImplementations§
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 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 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<BlockEvent, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<BlockEvent, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for BlockEvent
impl PartialEq for BlockEvent
Source§impl Serialize for BlockEvent
impl Serialize for BlockEvent
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 Eq for BlockEvent
impl StructuralPartialEq for BlockEvent
Auto Trait Implementations§
impl Freeze for BlockEvent
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