Struct feroxide::Container [] [src]

pub struct Container<E: Element> {
    pub contents: Vec<ContainerCompound<E>>,
    pub available_energy: Energy,
}

A container for elements

Fields

A vector with the contents of this container

The amount of energy available

Methods

impl<E: Element> Container<E>
[src]

Applies given reaction to container Removing the elements on the left-hand side and adding the elements on the right-hand side. If there is enough energy for the reaction, that amount will be consumed otherwise the reaction won't occur. Returns if the reaction succeeded

Check if the container has all given elements

Remove given elements from container

Add given elements to container

Convert container to a nice string for displaying

Trait Implementations

impl<E: Debug + Element> Debug for Container<E>
[src]

Formats the value using the given formatter.

impl<E: Clone + Element> Clone for Container<E>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<E: Element> Display for Container<E>
[src]

Formats the value using the given formatter. Read more