pub struct Nonce(/* private fields */);Expand description
Account transaction nonce.
Implementations§
Source§impl Nonce
impl Nonce
Sourcepub fn encoded_rlp_len(self) -> Result<usize, PrimitiveRlpError>
pub fn encoded_rlp_len(self) -> Result<usize, PrimitiveRlpError>
Returns the canonical RLP encoded length.
Sourcepub fn encode_rlp(self, output: &mut [u8]) -> Result<usize, PrimitiveRlpError>
pub fn encode_rlp(self, output: &mut [u8]) -> Result<usize, PrimitiveRlpError>
Canonically encodes this value into output.
Returns the number of bytes written. output is not modified
unless this function returns Ok.
Sourcepub fn try_from_rlp(
input: &[u8],
limits: DecodeLimits,
) -> Result<Self, PrimitiveRlpError>
pub fn try_from_rlp( input: &[u8], limits: DecodeLimits, ) -> Result<Self, PrimitiveRlpError>
Decodes exactly one canonical RLP integer into this domain.
Source§impl Nonce
impl Nonce
Sourcepub fn try_from_canonical_be_slice(bytes: &[u8]) -> Result<Self, PrimitiveError>
pub fn try_from_canonical_be_slice(bytes: &[u8]) -> Result<Self, PrimitiveError>
Creates a value from a canonical RLP integer payload.
The empty payload represents zero. Non-empty payloads must be shortest-form unsigned big-endian bytes without a leading zero.
Trait Implementations§
impl Copy for Nonce
impl Eq for Nonce
Source§impl Ord for Nonce
impl Ord for Nonce
1.21.0 (const: unstable) · 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 PartialOrd for Nonce
impl PartialOrd for Nonce
Source§impl RlpDecode for Nonce
impl RlpDecode for Nonce
Source§type Error = PrimitiveRlpError
type Error = PrimitiveRlpError
Error returned by this decoder.
Source§fn decode_rlp(input: &[u8], limits: DecodeLimits) -> Result<Self, Self::Error>
fn decode_rlp(input: &[u8], limits: DecodeLimits) -> Result<Self, Self::Error>
Decodes exactly one canonical RLP item from
input.Source§impl RlpEncode for Nonce
impl RlpEncode for Nonce
Source§type Error = PrimitiveRlpError
type Error = PrimitiveRlpError
Error returned by this encoder.
impl StructuralPartialEq for Nonce
Auto Trait Implementations§
impl Freeze for Nonce
impl RefUnwindSafe for Nonce
impl Send for Nonce
impl Sync for Nonce
impl Unpin for Nonce
impl UnsafeUnpin for Nonce
impl UnwindSafe for Nonce
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