pub struct BlockHeight(/* private fields */);
Expand description
FuelVM atomic numeric type.
Implementations§
source§impl BlockHeight
impl BlockHeight
source§impl BlockHeight
impl BlockHeight
sourcepub fn succ(self) -> Option<BlockHeight>
pub fn succ(self) -> Option<BlockHeight>
Successor, i.e. next block after this
sourcepub fn pred(self) -> Option<BlockHeight>
pub fn pred(self) -> Option<BlockHeight>
Predecessor, i.e. previous block before this
Trait Implementations§
source§impl Borrow<u32> for BlockHeight
impl Borrow<u32> for BlockHeight
source§impl BorrowMut<u32> for BlockHeight
impl BorrowMut<u32> for BlockHeight
source§fn borrow_mut(&mut self) -> &mut u32
fn borrow_mut(&mut self) -> &mut u32
Mutably borrows from an owned value. Read more
source§impl Clone for BlockHeight
impl Clone for BlockHeight
source§fn clone(&self) -> BlockHeight
fn clone(&self) -> BlockHeight
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 BlockHeight
impl Debug for BlockHeight
source§impl Default for BlockHeight
impl Default for BlockHeight
source§fn default() -> BlockHeight
fn default() -> BlockHeight
Returns the “default value” for a type. Read more
source§impl Deref for BlockHeight
impl Deref for BlockHeight
source§impl DerefMut for BlockHeight
impl DerefMut for BlockHeight
source§impl Deserialize for BlockHeight
impl Deserialize for BlockHeight
source§fn decode_static<I: Input + ?Sized>(buffer: &mut I) -> Result<Self, Error>
fn decode_static<I: Input + ?Sized>(buffer: &mut I) -> Result<Self, Error>
Decodes static part of
Self
from the buffer
.source§fn decode_dynamic<I: Input + ?Sized>(
&mut self,
buffer: &mut I,
) -> Result<(), Error>
fn decode_dynamic<I: Input + ?Sized>( &mut self, buffer: &mut I, ) -> Result<(), Error>
Decodes dynamic part of the information from the
buffer
to fill Self
.
The default implementation does nothing. Dynamically-sized contains should
override this.source§impl Display for BlockHeight
impl Display for BlockHeight
source§impl From<BlockHeight> for u32
impl From<BlockHeight> for u32
source§fn from(salt: BlockHeight) -> u32
fn from(salt: BlockHeight) -> u32
Converts to this type from the input type.
source§impl From<u32> for BlockHeight
impl From<u32> for BlockHeight
source§impl FromStr for BlockHeight
impl FromStr for BlockHeight
source§impl Hash for BlockHeight
impl Hash for BlockHeight
source§impl LowerHex for BlockHeight
impl LowerHex for BlockHeight
source§impl Ord for BlockHeight
impl Ord for BlockHeight
source§fn cmp(&self, other: &BlockHeight) -> Ordering
fn cmp(&self, other: &BlockHeight) -> 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 BlockHeight
impl PartialEq for BlockHeight
source§impl PartialOrd for BlockHeight
impl PartialOrd for BlockHeight
source§impl Serialize for BlockHeight
impl Serialize for BlockHeight
source§fn size_static(&self) -> usize
fn size_static(&self) -> usize
Size of the static part of the serialized object, in bytes.
Saturates to usize::MAX on overflow.
source§fn size_dynamic(&self) -> usize
fn size_dynamic(&self) -> usize
Size of the dynamic part, in bytes.
Saturates to usize::MAX on overflow.
source§fn encode_static<O: Output + ?Sized>(&self, buffer: &mut O) -> Result<(), Error>
fn encode_static<O: Output + ?Sized>(&self, buffer: &mut O) -> Result<(), Error>
Encodes staticly-sized part of
Self
.source§fn encode_dynamic<O: Output + ?Sized>(
&self,
buffer: &mut O,
) -> Result<(), Error>
fn encode_dynamic<O: Output + ?Sized>( &self, buffer: &mut O, ) -> Result<(), Error>
Encodes dynamically-sized part of
Self
.
The default implementation does nothing. Dynamically-sized contains should
override this.source§fn size(&self) -> usize
fn size(&self) -> usize
Total size of the serialized object, in bytes.
Saturates to usize::MAX on overflow.
source§impl TryFrom<&[u8]> for BlockHeight
impl TryFrom<&[u8]> for BlockHeight
source§type Error = TryFromSliceError
type Error = TryFromSliceError
The type returned in the event of a conversion error.
source§fn try_from(bytes: &[u8]) -> Result<BlockHeight, TryFromSliceError>
fn try_from(bytes: &[u8]) -> Result<BlockHeight, TryFromSliceError>
Performs the conversion.
source§impl UpperHex for BlockHeight
impl UpperHex for BlockHeight
impl Copy for BlockHeight
impl Eq for BlockHeight
impl StructuralPartialEq for BlockHeight
Auto Trait Implementations§
impl Freeze for BlockHeight
impl RefUnwindSafe for BlockHeight
impl Send for BlockHeight
impl Sync for BlockHeight
impl Unpin for BlockHeight
impl UnwindSafe for BlockHeight
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)