Trait shipyard::TightPack[][src]

pub trait TightPack {
    fn try_tight_pack(self) -> Result<(), Pack>;
fn tight_pack(self); }
Expand description

Trait used to tight pack storage(s).

Required methods

Tight packs storages.
Only non packed storages can be tight packed at the moment.

Example:

use shipyard::{TightPack, ViewMut, World};

let world = World::new();

world
    .borrow::<(ViewMut<usize>, ViewMut<u32>)>()
    .try_tight_pack()
    .unwrap();

Tight packs storages.
Only non packed storages can be tight packed at the moment.
Unwraps errors.

Example:

use shipyard::{TightPack, ViewMut, World};

let world = World::new();

world
    .borrow::<(ViewMut<usize>, ViewMut<u32>)>()
    .tight_pack();

Implementations on Foreign Types

Implementors