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]

[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

[src]

Check if the container has all given elements

[src]

Remove given elements from container

[src]

Add given elements to container

[src]

Convert container to a nice string for displaying

Trait Implementations

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

[src]

Formats the value using the given formatter.

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

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

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

[src]

Formats the value using the given formatter. Read more