pub struct BlockIdShort {
pub shard: ShardIdent,
pub seqno: u32,
}Expand description
Short block id.
Fields§
§shard: ShardIdentBlock shard ident.
seqno: u32Block number in shard.
Implementations§
Source§impl BlockIdShort
impl BlockIdShort
Sourcepub const fn is_masterchain(&self) -> bool
pub const fn is_masterchain(&self) -> bool
Returns true if this block id is for a masterchain block.
Sourcepub fn saturating_prev(&self) -> Self
pub fn saturating_prev(&self) -> Self
Returns a previous block id.
Sourcepub fn saturating_next(&self) -> Self
pub fn saturating_next(&self) -> Self
Returns a next block id.
Sourcepub fn saturating_add(&self, seqno: u32) -> Self
pub fn saturating_add(&self, seqno: u32) -> Self
Returns a new block id with the seqno increased at most by the specified value.
Sourcepub fn saturating_sub(&self, seqno: u32) -> Self
pub fn saturating_sub(&self, seqno: u32) -> Self
Returns a new block id with the seqno decreased at most by the specified value.
Trait Implementations§
Source§impl Clone for BlockIdShort
impl Clone for BlockIdShort
Source§fn clone(&self) -> BlockIdShort
fn clone(&self) -> BlockIdShort
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BlockIdShort
impl Debug for BlockIdShort
Source§impl Default for BlockIdShort
impl Default for BlockIdShort
Source§fn default() -> BlockIdShort
fn default() -> BlockIdShort
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for BlockIdShort
impl<'de> Deserialize<'de> for BlockIdShort
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 Display for BlockIdShort
impl Display for BlockIdShort
Source§impl From<(ShardIdent, u32)> for BlockIdShort
impl From<(ShardIdent, u32)> for BlockIdShort
Source§fn from((shard, seqno): (ShardIdent, u32)) -> Self
fn from((shard, seqno): (ShardIdent, u32)) -> Self
Converts to this type from the input type.
Source§impl From<BlockIdShort> for (ShardIdent, u32)
impl From<BlockIdShort> for (ShardIdent, u32)
Source§fn from(value: BlockIdShort) -> Self
fn from(value: BlockIdShort) -> Self
Converts to this type from the input type.
Source§impl Hash for BlockIdShort
impl Hash for BlockIdShort
Source§impl Ord for BlockIdShort
impl Ord for BlockIdShort
Source§fn cmp(&self, other: &BlockIdShort) -> Ordering
fn cmp(&self, other: &BlockIdShort) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for BlockIdShort
impl PartialEq for BlockIdShort
Source§impl PartialOrd for BlockIdShort
impl PartialOrd for BlockIdShort
Source§impl Serialize for BlockIdShort
impl Serialize for BlockIdShort
impl Copy for BlockIdShort
impl Eq for BlockIdShort
impl StructuralPartialEq for BlockIdShort
Auto Trait Implementations§
impl Freeze for BlockIdShort
impl RefUnwindSafe for BlockIdShort
impl Send for BlockIdShort
impl Sync for BlockIdShort
impl Unpin for BlockIdShort
impl UnwindSafe for BlockIdShort
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> Comparable<K> for Q
impl<Q, K> Comparable<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
Compares
self to key and returns true if they are equal.