pub struct QueueDiff {
pub hash: HashBytes,
pub prev_hash: HashBytes,
pub shard_ident: ShardIdent,
pub seqno: u32,
pub processed_to: BTreeMap<ShardIdent, QueueKey>,
pub min_message: QueueKey,
pub max_message: QueueKey,
pub messages: Vec<HashBytes>,
pub router_partitions_src: RouterPartitions,
pub router_partitions_dst: RouterPartitions,
}
Expand description
Representation of an internal messages queue diff.
Fields§
§hash: HashBytes
Computed hash of this diff.
NOTE: This field is not serialized and can be HashBytes::ZERO
for serialization.
prev_hash: HashBytes
Hash of the TL repr of the previous queue diff.
shard_ident: ShardIdent
Shard identifier of the corresponding block
seqno: u32
Seqno of the corresponding block.
processed_to: BTreeMap<ShardIdent, QueueKey>
collator boundaries.
min_message: QueueKey
Min message queue key.
max_message: QueueKey
Max message queue key.
messages: Vec<HashBytes>
List of message hashes (sorted ASC).
router_partitions_src: RouterPartitions
Inbound router partitions.
router_partitions_dst: RouterPartitions
Outbound router partitions.
Implementations§
Source§impl QueueDiff
impl QueueDiff
pub const TL_ID: u32 = 1_612_751_794u32
Sourcepub fn recompute_hash(&mut self)
pub fn recompute_hash(&mut self)
Recomputes the hash of the diff.
NOTE: Since the hash is not serialized, it is NOT mandatory to call this method if it will not be used after this.
Sourcepub fn compute_hash(data: &[u8]) -> HashBytes
pub fn compute_hash(data: &[u8]) -> HashBytes
Computes the hash of the serialized diff.
Trait Implementations§
Source§impl AsRef<QueueDiff> for QueueDiffStuff
impl AsRef<QueueDiff> for QueueDiffStuff
impl Eq for QueueDiff
impl StructuralPartialEq for QueueDiff
Auto Trait Implementations§
impl Freeze for QueueDiff
impl RefUnwindSafe for QueueDiff
impl Send for QueueDiff
impl Sync for QueueDiff
impl Unpin for QueueDiff
impl UnwindSafe for QueueDiff
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compares
self
to key
and returns true
if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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