[−][src]Struct grin_chain::linked_list::MultiIndex
Index supporting multiple duplicate entries.
Implementations
impl<T> MultiIndex<T>
[src]
pub fn init(list_prefix: u8, entry_prefix: u8) -> MultiIndex<T>
[src]
Initialize a new multi index with the specified list and entry prefixes.
Trait Implementations
impl<T> ListIndex for MultiIndex<T> where
T: PosEntry,
[src]
T: PosEntry,
type List = ListWrapper<T>
List type
type Entry = ListEntry<T>
List entry type
fn list_key(&self, commit: Commitment) -> Vec<u8>
[src]
fn entry_key(&self, commit: Commitment, pos: u64) -> Vec<u8>
[src]
fn peek_pos(
&self,
batch: &Batch<'_>,
commit: Commitment
) -> Result<Option<T>, Error>
[src]
&self,
batch: &Batch<'_>,
commit: Commitment
) -> Result<Option<T>, Error>
fn push_pos(
&self,
batch: &Batch<'_>,
commit: Commitment,
new_pos: T
) -> Result<(), Error>
[src]
&self,
batch: &Batch<'_>,
commit: Commitment,
new_pos: T
) -> Result<(), Error>
fn pop_pos(
&self,
batch: &Batch<'_>,
commit: Commitment
) -> Result<Option<T>, Error>
[src]
&self,
batch: &Batch<'_>,
commit: Commitment
) -> Result<Option<T>, Error>
Pop the head of the list. Returns the output_pos. Returns None if list was empty.
fn get_list(
&self,
batch: &Batch<'_>,
commit: Commitment
) -> Result<Option<Self::List>, Error>
[src]
&self,
batch: &Batch<'_>,
commit: Commitment
) -> Result<Option<Self::List>, Error>
fn get_entry(
&self,
batch: &Batch<'_>,
commit: Commitment,
pos: u64
) -> Result<Option<Self::Entry>, Error>
[src]
&self,
batch: &Batch<'_>,
commit: Commitment,
pos: u64
) -> Result<Option<Self::Entry>, Error>
impl<T: PosEntry> PruneableListIndex for MultiIndex<T>
[src]
fn clear(&self, batch: &Batch<'_>) -> Result<(), Error>
[src]
fn prune(
&self,
_batch: &Batch<'_>,
_commit: Commitment,
_cutoff_pos: u64
) -> Result<(), Error>
[src]
&self,
_batch: &Batch<'_>,
_commit: Commitment,
_cutoff_pos: u64
) -> Result<(), Error>
Pruning will be more performant than full rebuild but not yet necessary.
fn pop_pos_back(
&self,
batch: &Batch<'_>,
commit: Commitment
) -> Result<Option<T>, Error>
[src]
&self,
batch: &Batch<'_>,
commit: Commitment
) -> Result<Option<T>, Error>
Pop off the back/tail of the linked list. Used when pruning old data.
impl<T: PosEntry> RewindableListIndex for MultiIndex<T>
[src]
List index that supports rewind.
Auto Trait Implementations
impl<T> RefUnwindSafe for MultiIndex<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> !Send for MultiIndex<T>
impl<T> !Sync for MultiIndex<T>
impl<T> Unpin for MultiIndex<T>
impl<T> UnwindSafe for MultiIndex<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> SafeBorrow<T> for T where
T: ?Sized,
T: ?Sized,
fn borrow_replacement(ptr: &T) -> &T
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> UnsafeAny for T where
T: Any,
T: Any,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,