Skip to main content

VecIndex

Trait VecIndex 

Source
pub trait VecIndex:
    Debug
    + Default
    + Copy
    + Clone
    + PartialEq
    + Eq
    + PartialOrd
    + Ord
    + From<usize>
    + Into<usize>
    + Add<usize, Output = Self>
    + Send
    + Sync
    + PrintableIndex
    + 'static {
    const INITIAL_CAPACITY: usize = 0;

    // Provided methods
    fn to_usize(self) -> usize { ... }
    fn decremented(self) -> Option<Self> { ... }
}
Expand description

Trait for types that can be used as vector indices.

Provided Associated Constants§

Source

const INITIAL_CAPACITY: usize = 0

Initial element capacity for newly created fixed-width raw vectors.

Provided Methods§

Source

fn to_usize(self) -> usize

Converts this index to a usize.

Source

fn decremented(self) -> Option<Self>

Returns the previous index, or None if this is zero.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl VecIndex for usize

Implementors§

Source§

impl VecIndex for Day1

Source§

impl VecIndex for Day3

Source§

impl VecIndex for EmptyAddrIndex

Source§

const INITIAL_CAPACITY: usize = 1_800_000_000

Source§

impl VecIndex for EmptyOutputIndex

Source§

impl VecIndex for Epoch

Source§

impl VecIndex for FundedAddrIndex

Source§

const INITIAL_CAPACITY: usize = 70_000_000

Source§

impl VecIndex for Halving

Source§

impl VecIndex for Height

Source§

const INITIAL_CAPACITY: usize = 1_200_000

Source§

impl VecIndex for Hour1

Source§

impl VecIndex for Hour4

Source§

impl VecIndex for Hour12

Source§

impl VecIndex for Minute10

Source§

impl VecIndex for Minute30

Source§

impl VecIndex for Month1

Source§

impl VecIndex for Month3

Source§

impl VecIndex for Month6

Source§

impl VecIndex for OpReturnIndex

Source§

impl VecIndex for P2AAddrIndex

Source§

const INITIAL_CAPACITY: usize = 1_000_000

Source§

impl VecIndex for P2MSOutputIndex

Source§

const INITIAL_CAPACITY: usize = 4_000_000

Source§

impl VecIndex for P2PK33AddrIndex

Source§

impl VecIndex for P2PK65AddrIndex

Source§

impl VecIndex for P2PKHAddrIndex

Source§

const INITIAL_CAPACITY: usize = 750_000_000

Source§

impl VecIndex for P2SHAddrIndex

Source§

const INITIAL_CAPACITY: usize = 500_000_000

Source§

impl VecIndex for P2TRAddrIndex

Source§

const INITIAL_CAPACITY: usize = 100_000_000

Source§

impl VecIndex for P2WPKHAddrIndex

Source§

const INITIAL_CAPACITY: usize = 500_000_000

Source§

impl VecIndex for P2WSHAddrIndex

Source§

const INITIAL_CAPACITY: usize = 50_000_000

Source§

impl VecIndex for StoredU8

Source§

impl VecIndex for TxInIndex

Source§

const INITIAL_CAPACITY: usize = 4_200_000_000

Source§

impl VecIndex for TxIndex

Source§

const INITIAL_CAPACITY: usize = 1_700_000_000

Source§

impl VecIndex for TxOutIndex

Source§

const INITIAL_CAPACITY: usize = 4_700_000_000

Source§

impl VecIndex for UnknownOutputIndex

Source§

impl VecIndex for Week1

Source§

impl VecIndex for Year

Source§

impl VecIndex for Year1

Source§

impl VecIndex for Year10