#[repr(C)]pub struct SlotNumber(/* private fields */);
Expand description
Slot number
Implementations§
Source§impl SlotNumber
impl SlotNumber
Sourcepub const fn from_bytes(bytes: [u8; 8]) -> Self
pub const fn from_bytes(bytes: [u8; 8]) -> Self
Create slot number from bytes
Sourcepub fn checked_add(self, rhs: Self) -> Option<Self>
pub fn checked_add(self, rhs: Self) -> Option<Self>
Checked integer addition. Computes self + rhs
, returning None
if overflow occurred
Sourcepub fn checked_sub(self, rhs: Self) -> Option<Self>
pub fn checked_sub(self, rhs: Self) -> Option<Self>
Checked integer subtraction. Computes self - rhs
, returning None
if overflow occurred
Trait Implementations§
Source§impl Add for SlotNumber
impl Add for SlotNumber
Source§type Output = SlotNumber
type Output = SlotNumber
The resulting type after applying the
+
operator.Source§fn add(self, rhs: SlotNumber) -> SlotNumber
fn add(self, rhs: SlotNumber) -> SlotNumber
Performs the
+
operation. Read moreSource§impl AddAssign for SlotNumber
impl AddAssign for SlotNumber
Source§fn add_assign(&mut self, rhs: SlotNumber)
fn add_assign(&mut self, rhs: SlotNumber)
Performs the
+=
operation. Read moreSource§impl Clone for SlotNumber
impl Clone for SlotNumber
Source§fn clone(&self) -> SlotNumber
fn clone(&self) -> SlotNumber
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 SlotNumber
impl Debug for SlotNumber
Source§impl Decode for SlotNumber
impl Decode for SlotNumber
Source§fn decode<__CodecInputEdqy: Input>(
__codec_input_edqy: &mut __CodecInputEdqy,
) -> Result<Self, Error>
fn decode<__CodecInputEdqy: Input>( __codec_input_edqy: &mut __CodecInputEdqy, ) -> Result<Self, Error>
Attempt to deserialise the value from input.
§fn decode_into<I>(
input: &mut I,
dst: &mut MaybeUninit<Self>,
) -> Result<DecodeFinished, Error>where
I: Input,
fn decode_into<I>(
input: &mut I,
dst: &mut MaybeUninit<Self>,
) -> Result<DecodeFinished, Error>where
I: Input,
Attempt to deserialize the value from input into a pre-allocated piece of memory. Read more
§fn skip<I>(input: &mut I) -> Result<(), Error>where
I: Input,
fn skip<I>(input: &mut I) -> Result<(), Error>where
I: Input,
Attempt to skip the encoded value from input. Read more
§fn encoded_fixed_size() -> Option<usize>
fn encoded_fixed_size() -> Option<usize>
Returns the fixed encoded size of the type. Read more
Source§impl Default for SlotNumber
impl Default for SlotNumber
Source§fn default() -> SlotNumber
fn default() -> SlotNumber
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for SlotNumber
impl<'de> Deserialize<'de> for SlotNumber
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 SlotNumber
impl Display for SlotNumber
Source§impl<__RhsT> Div<__RhsT> for SlotNumber
impl<__RhsT> Div<__RhsT> for SlotNumber
Source§type Output = SlotNumber
type Output = SlotNumber
The resulting type after applying the
/
operator.Source§fn div(self, rhs: __RhsT) -> SlotNumber
fn div(self, rhs: __RhsT) -> SlotNumber
Performs the
/
operation. Read moreSource§impl<__RhsT> DivAssign<__RhsT> for SlotNumber
impl<__RhsT> DivAssign<__RhsT> for SlotNumber
Source§fn div_assign(&mut self, rhs: __RhsT)
fn div_assign(&mut self, rhs: __RhsT)
Performs the
/=
operation. Read moreSource§impl Encode for SlotNumber
impl Encode for SlotNumber
Source§fn size_hint(&self) -> usize
fn size_hint(&self) -> usize
If possible give a hint of expected size of the encoding. Read more
Source§fn encode_to<__CodecOutputEdqy: Output + ?Sized>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy,
)
fn encode_to<__CodecOutputEdqy: Output + ?Sized>( &self, __codec_dest_edqy: &mut __CodecOutputEdqy, )
Convert self to a slice and append it to the destination.
Source§fn using_encoded<__CodecOutputReturn, __CodecUsingEncodedCallback: FnOnce(&[u8]) -> __CodecOutputReturn>(
&self,
f: __CodecUsingEncodedCallback,
) -> __CodecOutputReturn
fn using_encoded<__CodecOutputReturn, __CodecUsingEncodedCallback: FnOnce(&[u8]) -> __CodecOutputReturn>( &self, f: __CodecUsingEncodedCallback, ) -> __CodecOutputReturn
Convert self to a slice and then invoke the given closure with it.
§fn encoded_size(&self) -> usize
fn encoded_size(&self) -> usize
Calculates the encoded size. Read more
Source§impl From<SlotNumber> for u128
impl From<SlotNumber> for u128
Source§fn from(original: SlotNumber) -> Self
fn from(original: SlotNumber) -> Self
Converts to this type from the input type.
Source§impl From<SlotNumber> for u64
impl From<SlotNumber> for u64
Source§fn from(value: SlotNumber) -> Self
fn from(value: SlotNumber) -> Self
Converts to this type from the input type.
Source§impl From<u64> for SlotNumber
impl From<u64> for SlotNumber
Source§impl Hash for SlotNumber
impl Hash for SlotNumber
Source§impl MaxEncodedLen for SlotNumber
impl MaxEncodedLen for SlotNumber
Source§fn max_encoded_len() -> usize
fn max_encoded_len() -> usize
Upper bound, in bytes, of the maximum encoded size of this item.
Source§impl<__RhsT> Mul<__RhsT> for SlotNumber
impl<__RhsT> Mul<__RhsT> for SlotNumber
Source§type Output = SlotNumber
type Output = SlotNumber
The resulting type after applying the
*
operator.Source§fn mul(self, rhs: __RhsT) -> SlotNumber
fn mul(self, rhs: __RhsT) -> SlotNumber
Performs the
*
operation. Read moreSource§impl<__RhsT> MulAssign<__RhsT> for SlotNumber
impl<__RhsT> MulAssign<__RhsT> for SlotNumber
Source§fn mul_assign(&mut self, rhs: __RhsT)
fn mul_assign(&mut self, rhs: __RhsT)
Performs the
*=
operation. Read moreSource§impl Ord for SlotNumber
impl Ord for SlotNumber
Source§fn cmp(&self, other: &SlotNumber) -> Ordering
fn cmp(&self, other: &SlotNumber) -> 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 SlotNumber
impl PartialEq for SlotNumber
Source§impl PartialOrd for SlotNumber
impl PartialOrd for SlotNumber
Source§impl Serialize for SlotNumber
impl Serialize for SlotNumber
Source§impl Step for SlotNumber
impl Step for SlotNumber
Source§fn steps_between(start: &Self, end: &Self) -> (usize, Option<usize>)
fn steps_between(start: &Self, end: &Self) -> (usize, Option<usize>)
🔬This is a nightly-only experimental API. (
step_trait
)Returns the bounds on the number of successor steps required to get from
start
to end
like Iterator::size_hint()
. Read moreSource§fn forward_checked(start: Self, count: usize) -> Option<Self>
fn forward_checked(start: Self, count: usize) -> Option<Self>
🔬This is a nightly-only experimental API. (
step_trait
)Source§fn backward_checked(start: Self, count: usize) -> Option<Self>
fn backward_checked(start: Self, count: usize) -> Option<Self>
🔬This is a nightly-only experimental API. (
step_trait
)Source§fn forward(start: Self, count: usize) -> Self
fn forward(start: Self, count: usize) -> Self
🔬This is a nightly-only experimental API. (
step_trait
)Source§unsafe fn forward_unchecked(start: Self, count: usize) -> Self
unsafe fn forward_unchecked(start: Self, count: usize) -> Self
🔬This is a nightly-only experimental API. (
step_trait
)Source§fn backward(start: Self, count: usize) -> Self
fn backward(start: Self, count: usize) -> Self
🔬This is a nightly-only experimental API. (
step_trait
)Source§unsafe fn backward_unchecked(start: Self, count: usize) -> Self
unsafe fn backward_unchecked(start: Self, count: usize) -> Self
🔬This is a nightly-only experimental API. (
step_trait
)Source§impl Sub for SlotNumber
impl Sub for SlotNumber
Source§type Output = SlotNumber
type Output = SlotNumber
The resulting type after applying the
-
operator.Source§fn sub(self, rhs: SlotNumber) -> SlotNumber
fn sub(self, rhs: SlotNumber) -> SlotNumber
Performs the
-
operation. Read moreSource§impl SubAssign for SlotNumber
impl SubAssign for SlotNumber
Source§fn sub_assign(&mut self, rhs: SlotNumber)
fn sub_assign(&mut self, rhs: SlotNumber)
Performs the
-=
operation. Read moreSource§impl TrivialType for SlotNumberwhere
u64: TrivialType,
impl TrivialType for SlotNumberwhere
u64: TrivialType,
Source§const METADATA: &[u8]
const METADATA: &[u8]
Data structure metadata in binary form, describing shape and types of the contents, see
IoTypeMetadataKind
for encoding details.const SIZE: u32 = _
Source§unsafe fn from_bytes(bytes: &[u8]) -> Option<&Self>
unsafe fn from_bytes(bytes: &[u8]) -> Option<&Self>
Create a reference to a type, which is represented by provided memory. Read more
Source§impl TypeInfo for SlotNumber
impl TypeInfo for SlotNumber
impl Copy for SlotNumber
impl EncodeLike for SlotNumber
impl Eq for SlotNumber
impl StructuralPartialEq for SlotNumber
Auto Trait Implementations§
impl Freeze for SlotNumber
impl RefUnwindSafe for SlotNumber
impl Send for SlotNumber
impl Sync for SlotNumber
impl Unpin for SlotNumber
impl UnwindSafe for SlotNumber
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,
§impl<T> DecodeAll for Twhere
T: Decode,
impl<T> DecodeAll for Twhere
T: Decode,
§fn decode_all(input: &mut &[u8]) -> Result<T, Error>
fn decode_all(input: &mut &[u8]) -> Result<T, Error>
Decode
Self
and consume all of the given input data. Read more§impl<T> DecodeLimit for Twhere
T: Decode,
impl<T> DecodeLimit for Twhere
T: Decode,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
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 moreSource§impl<T> IoType for Twhere
T: TrivialType,
impl<T> IoType for Twhere
T: TrivialType,
Source§const METADATA: &'static [u8] = T::METADATA
const METADATA: &'static [u8] = T::METADATA
Data structure metadata in binary form, describing shape and types of the contents, see
IoTypeMetadataKind
for encoding detailsSource§type PointerType = T
type PointerType = T
Pointer with trivial type that this
IoType
representsSource§unsafe fn size_ptr(&self) -> impl Deref<Target = NonNull<u32>>
unsafe fn size_ptr(&self) -> impl Deref<Target = NonNull<u32>>
Pointer to the number of bytes that are currently used to store data. Read more
Source§unsafe fn size_mut_ptr(&mut self) -> impl DerefMut
unsafe fn size_mut_ptr(&mut self) -> impl DerefMut
An exclusive pointer to the number of bytes that are currently used to store data. Read more
Source§unsafe fn capacity_ptr(&self) -> impl Deref<Target = NonNull<u32>>
unsafe fn capacity_ptr(&self) -> impl Deref<Target = NonNull<u32>>
Number of bytes are allocated right now Read more
Source§unsafe fn from_ptr<'a>(
ptr: &'a NonNull<<T as IoType>::PointerType>,
size: &'a u32,
capacity: u32,
) -> impl Deref<Target = T> + 'a
unsafe fn from_ptr<'a>( ptr: &'a NonNull<<T as IoType>::PointerType>, size: &'a u32, capacity: u32, ) -> impl Deref<Target = T> + 'a
Create a reference to a type, which is represented by provided memory. Read more
Source§unsafe fn from_mut_ptr<'a>(
ptr: &'a mut NonNull<<T as IoType>::PointerType>,
_size: &'a mut *mut u32,
capacity: u32,
) -> impl DerefMut + 'a
unsafe fn from_mut_ptr<'a>( ptr: &'a mut NonNull<<T as IoType>::PointerType>, _size: &'a mut *mut u32, capacity: u32, ) -> impl DerefMut + 'a
Create a mutable reference to a type, which is represented by provided memory. Read more
Source§unsafe fn as_ptr(
&self,
) -> impl Deref<Target = NonNull<<T as IoType>::PointerType>>
unsafe fn as_ptr( &self, ) -> impl Deref<Target = NonNull<<T as IoType>::PointerType>>
Get a raw pointer to the underlying data with no checks. Read more
Source§unsafe fn as_mut_ptr(&mut self) -> impl DerefMut
unsafe fn as_mut_ptr(&mut self) -> impl DerefMut
Get an exclusive raw pointer to the underlying data with no checks. Read more