Struct fuel_types::ChainId
source · pub struct ChainId(/* private fields */);
Expand description
FuelVM atomic numeric type.
Implementations§
Methods from Deref<Target = u64>§
pub const MIN: u64 = 0u64
pub const MAX: u64 = 18_446_744_073_709_551_615u64
pub const BITS: u32 = 64u32
Trait Implementations§
source§impl BorrowMut<u64> for ChainId
impl BorrowMut<u64> for ChainId
source§fn borrow_mut(&mut self) -> &mut u64
fn borrow_mut(&mut self) -> &mut u64
Mutably borrows from an owned value. Read more
source§impl Deserialize for ChainId
impl Deserialize for ChainId
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 Ord for ChainId
impl Ord for ChainId
source§impl PartialEq for ChainId
impl PartialEq for ChainId
source§impl PartialOrd for ChainId
impl PartialOrd for ChainId
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl Serialize for ChainId
impl Serialize for ChainId
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 ChainId
impl TryFrom<&[u8]> for ChainId
§type Error = TryFromSliceError
type Error = TryFromSliceError
The type returned in the event of a conversion error.
impl Copy for ChainId
impl Eq for ChainId
impl StructuralPartialEq for ChainId
Auto Trait Implementations§
impl Freeze for ChainId
impl RefUnwindSafe for ChainId
impl Send for ChainId
impl Sync for ChainId
impl Unpin for ChainId
impl UnwindSafe for ChainId
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