Struct iodyn::archive_stack::AStack [] [src]

pub struct AStack<E: 'static + Debug + Clone + Eq + Hash, M: 'static + Debug + Clone + Eq + Hash> { /* fields omitted */ }

Incremental Archive Stack

Operations on a mutable vector, with a persistent stack of vectors available. pop() will open archives, but pushing to the archive requires the archive() method.

Parametric over elements, E, and metadata M, that will be included with archived vectors. Metadata is currently only available if the archive is accessed with next_archive()

Methods

impl<E: 'static + Debug + Clone + Eq + Hash, M: 'static + Debug + Clone + Eq + Hash> AStack<E, M>
[src]

new AStack with a new vector as current stack

new AStack with a new pre-allocated vector as current stack

whether or not the AStack has any data, including archived data

the total item count of the AStack, including archived data

get the incremental name of the archive, if it exists

push a element to the "fast" vector outside of the archive

remove and return the element at the top of the stack, even if it is within the archive.

archive metadata is lost when opening an archive in this way

remove and return the element at the top of the stack, even if it is withing the archive. If it was within the archive, return the metadata associated with that archive.

Exposes the last data archived, returning the prior active vector and the metadata stored with the archive

peeks at the entire active vector

peeks at the element at the top of the stack, even if it is within the archive.

peeking into the archive does not open it, so it will retain any associated metadata

push the entire active vector into the archive, along with associated metadata return false if the active vector was empty. In this case, no archive will happen and the metadata will be unused

push the entire active vector into the archive, providing a capacity for the new active vector

Trait Implementations

impl<E: Debug + 'static + Debug + Clone + Eq + Hash, M: Debug + 'static + Debug + Clone + Eq + Hash> Debug for AStack<E, M>
[src]

Formats the value using the given formatter.

impl<E: PartialEq + 'static + Debug + Clone + Eq + Hash, M: PartialEq + 'static + Debug + Clone + Eq + Hash> PartialEq for AStack<E, M>
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl<E: Eq + 'static + Debug + Clone + Eq + Hash, M: Eq + 'static + Debug + Clone + Eq + Hash> Eq for AStack<E, M>
[src]

impl<E: Clone + 'static + Debug + Clone + Eq + Hash, M: Clone + 'static + Debug + Clone + Eq + Hash> Clone for AStack<E, M>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<E: Hash + 'static + Debug + Clone + Eq + Hash, M: Hash + 'static + Debug + Clone + Eq + Hash> Hash for AStack<E, M>
[src]

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more

impl<E: 'static + Debug + Clone + Eq + Hash, M: 'static + Debug + Clone + Eq + Hash> IntoIterator for AStack<E, M>
[src]

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

Creates an iterator from a value. Read more

impl<E: 'static + Debug + Clone + Eq + Hash> From<Vec<E>> for AStack<E, ()>
[src]

standard conversion, but no metadata will be included

Performs the conversion.