Trait push_trait::append::Append [] [src]

pub trait Append: Sized + Clear {
    fn append(&mut self, val: &mut Self);
}

A trait for moving data from one collection into another without freeing resources.

Conceptually, an append is equivalent to a push, with the caveat that the data is "moved out" of the pushed collection instead of being consumed. This allows reuse of the pushed collection's resources.

Required Methods

Moves data out of val and into this collection.

Invoking this method should make val empty without freeing any resources. Any data that would be pushed out of self should be retained in val.

Implementors