std::collections::ordered_vec¶
Status: experimental
Sorted-on-insert Vec
API details and source¶
The implementation source contains the complete declarations and implementation notes. The table below lists canonical Gossamer call signatures; every item name links directly to its implementation file.
| Item | Canonical signature or declaration | Description |
|---|---|---|
contains |
fn contains(xs: Vec<i64>, value: i64) -> bool |
Return true iff value is present. |
index_of |
fn index_of(xs: Vec<i64>, value: i64) -> Option<i64> |
Return the index of value, or -1. |
insert |
fn insert(xs: Vec<i64>, value: i64) -> Vec<i64> |
Insert at the unique sorted position. |
len |
fn len(xs: Vec<i64>) -> i64 |
Element count. |
peek_max |
fn peek_max(xs: Vec<i64>) -> i64 |
Largest element, or 0. |
peek_min |
fn peek_min(xs: Vec<i64>) -> i64 |
Smallest element, or 0. |
remove_at |
fn remove_at(xs: Vec<i64>, index: i64) -> Vec<i64> |
Remove the element at index i. |