Struct StoredUsize

Source
pub struct StoredUsize(/* private fields */);

Implementations§

Source§

impl StoredUsize

Source

pub const ZERO: Self

Source

pub fn new(counter: usize) -> Self

Methods from Deref<Target = usize>§

1.43.0 · Source

pub const MIN: usize = 0usize

1.43.0 · Source

pub const MAX: usize = 18_446_744_073_709_551_615usize

1.53.0 · Source

pub const BITS: u32 = 64u32

Trait Implementations§

Source§

impl Add for StoredUsize

Source§

type Output = StoredUsize

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Self) -> Self::Output

Performs the + operation. Read more
Source§

impl AddAssign for StoredUsize

Source§

fn add_assign(&mut self, rhs: Self)

Performs the += operation. Read more
Source§

impl CheckedSub for StoredUsize

Source§

fn checked_sub(self, rhs: Self) -> Option<Self>

Source§

impl Clone for StoredUsize

Source§

fn clone(&self) -> StoredUsize

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for StoredUsize

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for StoredUsize

Source§

fn default() -> StoredUsize

Returns the “default value” for a type. Read more
Source§

impl Deref for StoredUsize

Source§

type Target = usize

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl DerefMut for StoredUsize

Source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.
Source§

impl Div<usize> for StoredUsize

Source§

type Output = StoredUsize

The resulting type after applying the / operator.
Source§

fn div(self, rhs: usize) -> Self::Output

Performs the / operation. Read more
Source§

impl From<DateIndex> for StoredUsize

Source§

fn from(value: DateIndex) -> Self

Converts to this type from the input type.
Source§

impl From<EmptyOutputIndex> for StoredUsize

Source§

fn from(value: EmptyOutputIndex) -> Self

Converts to this type from the input type.
Source§

impl From<Height> for StoredUsize

Source§

fn from(value: Height) -> Self

Converts to this type from the input type.
Source§

impl From<InputIndex> for StoredUsize

Source§

fn from(value: InputIndex) -> Self

Converts to this type from the input type.
Source§

impl From<MonthIndex> for StoredUsize

Source§

fn from(value: MonthIndex) -> Self

Converts to this type from the input type.
Source§

impl From<OpReturnIndex> for StoredUsize

Source§

fn from(value: OpReturnIndex) -> Self

Converts to this type from the input type.
Source§

impl From<OutputIndex> for StoredUsize

Source§

fn from(value: OutputIndex) -> Self

Converts to this type from the input type.
Source§

impl From<P2AAddressIndex> for StoredUsize

Source§

fn from(value: P2AAddressIndex) -> Self

Converts to this type from the input type.
Source§

impl From<P2MSOutputIndex> for StoredUsize

Source§

fn from(value: P2MSOutputIndex) -> Self

Converts to this type from the input type.
Source§

impl From<P2PK33AddressIndex> for StoredUsize

Source§

fn from(value: P2PK33AddressIndex) -> Self

Converts to this type from the input type.
Source§

impl From<P2PK65AddressIndex> for StoredUsize

Source§

fn from(value: P2PK65AddressIndex) -> Self

Converts to this type from the input type.
Source§

impl From<P2PKHAddressIndex> for StoredUsize

Source§

fn from(value: P2PKHAddressIndex) -> Self

Converts to this type from the input type.
Source§

impl From<P2SHAddressIndex> for StoredUsize

Source§

fn from(value: P2SHAddressIndex) -> Self

Converts to this type from the input type.
Source§

impl From<P2TRAddressIndex> for StoredUsize

Source§

fn from(value: P2TRAddressIndex) -> Self

Converts to this type from the input type.
Source§

impl From<P2WPKHAddressIndex> for StoredUsize

Source§

fn from(value: P2WPKHAddressIndex) -> Self

Converts to this type from the input type.
Source§

impl From<P2WSHAddressIndex> for StoredUsize

Source§

fn from(value: P2WSHAddressIndex) -> Self

Converts to this type from the input type.
Source§

impl From<StoredUsize> for Height

Source§

fn from(value: StoredUsize) -> Self

Converts to this type from the input type.
Source§

impl From<StoredUsize> for f64

Source§

fn from(value: StoredUsize) -> Self

Converts to this type from the input type.
Source§

impl From<StoredUsize> for usize

Source§

fn from(value: StoredUsize) -> Self

Converts to this type from the input type.
Source§

impl From<TxIndex> for StoredUsize

Source§

fn from(value: TxIndex) -> Self

Converts to this type from the input type.
Source§

impl From<UnknownOutputIndex> for StoredUsize

Source§

fn from(value: UnknownOutputIndex) -> Self

Converts to this type from the input type.
Source§

impl From<YearIndex> for StoredUsize

Source§

fn from(value: YearIndex) -> Self

Converts to this type from the input type.
Source§

impl From<f64> for StoredUsize

Source§

fn from(value: f64) -> Self

Converts to this type from the input type.
Source§

impl From<usize> for StoredUsize

Source§

fn from(value: usize) -> Self

Converts to this type from the input type.
Source§

impl FromBytes for StoredUsize

Source§

fn ref_from_bytes( source: &[u8], ) -> Result<&Self, ConvertError<AlignmentError<&[u8], Self>, SizeError<&[u8], Self>, Infallible>>
where Self: KnownLayout + Immutable,

Interprets the given source as a &Self. Read more
Source§

fn ref_from_prefix( source: &[u8], ) -> Result<(&Self, &[u8]), ConvertError<AlignmentError<&[u8], Self>, SizeError<&[u8], Self>, Infallible>>
where Self: KnownLayout + Immutable,

Interprets the prefix of the given source as a &Self without copying. Read more
Source§

fn ref_from_suffix( source: &[u8], ) -> Result<(&[u8], &Self), ConvertError<AlignmentError<&[u8], Self>, SizeError<&[u8], Self>, Infallible>>
where Self: Immutable + KnownLayout,

Interprets the suffix of the given bytes as a &Self. Read more
Source§

fn mut_from_bytes( source: &mut [u8], ) -> Result<&mut Self, ConvertError<AlignmentError<&mut [u8], Self>, SizeError<&mut [u8], Self>, Infallible>>
where Self: IntoBytes + KnownLayout,

Interprets the given source as a &mut Self. Read more
Source§

fn mut_from_prefix( source: &mut [u8], ) -> Result<(&mut Self, &mut [u8]), ConvertError<AlignmentError<&mut [u8], Self>, SizeError<&mut [u8], Self>, Infallible>>
where Self: IntoBytes + KnownLayout,

Interprets the prefix of the given source as a &mut Self without copying. Read more
Source§

fn mut_from_suffix( source: &mut [u8], ) -> Result<(&mut [u8], &mut Self), ConvertError<AlignmentError<&mut [u8], Self>, SizeError<&mut [u8], Self>, Infallible>>
where Self: IntoBytes + KnownLayout,

Interprets the suffix of the given source as a &mut Self without copying. Read more
Source§

fn read_from_bytes(source: &[u8]) -> Result<Self, SizeError<&[u8], Self>>
where Self: Sized,

Reads a copy of Self from the given source. Read more
Source§

fn read_from_prefix( source: &[u8], ) -> Result<(Self, &[u8]), SizeError<&[u8], Self>>
where Self: Sized,

Reads a copy of Self from the prefix of the given source. Read more
Source§

fn read_from_suffix( source: &[u8], ) -> Result<(&[u8], Self), SizeError<&[u8], Self>>
where Self: Sized,

Reads a copy of Self from the suffix of the given source. Read more
Source§

impl FromZeros for StoredUsize

Source§

fn zero(&mut self)

Overwrites self with zeros. Read more
Source§

fn new_zeroed() -> Self
where Self: Sized,

Creates an instance of Self from zeroed bytes. Read more
Source§

impl IntoBytes for StoredUsize
where usize: IntoBytes, (): PaddingFree<Self, { _ }>,

Source§

fn as_bytes(&self) -> &[u8]
where Self: Immutable,

Gets the bytes of this value. Read more
Source§

fn as_mut_bytes(&mut self) -> &mut [u8]
where Self: FromBytes,

Gets the bytes of this value mutably. Read more
Source§

fn write_to(&self, dst: &mut [u8]) -> Result<(), SizeError<&Self, &mut [u8]>>
where Self: Immutable,

Writes a copy of self to dst. Read more
Source§

fn write_to_prefix( &self, dst: &mut [u8], ) -> Result<(), SizeError<&Self, &mut [u8]>>
where Self: Immutable,

Writes a copy of self to the prefix of dst. Read more
Source§

fn write_to_suffix( &self, dst: &mut [u8], ) -> Result<(), SizeError<&Self, &mut [u8]>>
where Self: Immutable,

Writes a copy of self to the suffix of dst. Read more
Source§

impl KnownLayout for StoredUsize
where Self: Sized,

Source§

type PointerMetadata = ()

The type of metadata stored in a pointer to Self. Read more
Source§

impl Ord for StoredUsize

Source§

fn cmp(&self, other: &StoredUsize) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq for StoredUsize

Source§

fn eq(&self, other: &StoredUsize) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialOrd for StoredUsize

Source§

fn partial_cmp(&self, other: &StoredUsize) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl Printable for StoredUsize

Source§

fn to_string() -> &'static str

Source§

fn to_possible_strings() -> &'static [&'static str]

Source§

impl Serialize for StoredUsize

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl TryFromBytes for StoredUsize

Source§

fn try_ref_from_bytes( source: &[u8], ) -> Result<&Self, ConvertError<AlignmentError<&[u8], Self>, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>
where Self: KnownLayout + Immutable,

Attempts to interpret the given source as a &Self. Read more
Source§

fn try_ref_from_prefix( source: &[u8], ) -> Result<(&Self, &[u8]), ConvertError<AlignmentError<&[u8], Self>, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>
where Self: KnownLayout + Immutable,

Attempts to interpret the prefix of the given source as a &Self. Read more
Source§

fn try_ref_from_suffix( source: &[u8], ) -> Result<(&[u8], &Self), ConvertError<AlignmentError<&[u8], Self>, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>
where Self: KnownLayout + Immutable,

Attempts to interpret the suffix of the given source as a &Self. Read more
Source§

fn try_mut_from_bytes( bytes: &mut [u8], ) -> Result<&mut Self, ConvertError<AlignmentError<&mut [u8], Self>, SizeError<&mut [u8], Self>, ValidityError<&mut [u8], Self>>>
where Self: KnownLayout + IntoBytes,

Attempts to interpret the given source as a &mut Self without copying. Read more
Source§

fn try_mut_from_prefix( source: &mut [u8], ) -> Result<(&mut Self, &mut [u8]), ConvertError<AlignmentError<&mut [u8], Self>, SizeError<&mut [u8], Self>, ValidityError<&mut [u8], Self>>>
where Self: KnownLayout + IntoBytes,

Attempts to interpret the prefix of the given source as a &mut Self. Read more
Source§

fn try_mut_from_suffix( source: &mut [u8], ) -> Result<(&mut [u8], &mut Self), ConvertError<AlignmentError<&mut [u8], Self>, SizeError<&mut [u8], Self>, ValidityError<&mut [u8], Self>>>
where Self: KnownLayout + IntoBytes,

Attempts to interpret the suffix of the given source as a &mut Self. Read more
Source§

fn try_read_from_bytes( source: &[u8], ) -> Result<Self, ConvertError<Infallible, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>
where Self: Sized,

Attempts to read the given source as a Self. Read more
Source§

fn try_read_from_prefix( source: &[u8], ) -> Result<(Self, &[u8]), ConvertError<Infallible, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>
where Self: Sized,

Attempts to read a Self from the prefix of the given source. Read more
Source§

fn try_read_from_suffix( source: &[u8], ) -> Result<(&[u8], Self), ConvertError<Infallible, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>
where Self: Sized,

Attempts to read a Self from the suffix of the given source. Read more
Source§

impl Copy for StoredUsize

Source§

impl Eq for StoredUsize

Source§

impl Immutable for StoredUsize

Source§

impl StructuralPartialEq for StoredUsize

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Comparable<K> for Q
where Q: Ord + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn compare(&self, key: &K) -> Ordering

Compare self to key and return their ordering.
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V