bundle_bundle

Crates.iobundle_bundle
lib.rsbundle_bundle
version0.1.1
sourcesrc
created_at2022-11-25 16:06:15.716474
updated_at2022-11-30 12:39:03.917597
descriptionbundle bundles in a chain
homepage
repositoryhttps://github.com/ickshonpe/bundle_bundle
max_upload_size
id722859
size87,473
(ickshonpe)

documentation

README

bundle_bundle

Extension trait for Bundle with one method bundle that provides an alternative to tuples for building anonymous bundles.

Supports Bevy 0.9

Usage

Add to your project with:

cargo add bundle_bundle

Now where you used a tuple struct:

commands.spawn((
    Text2dBundle::from_section("message", text_style),
    Background(Color::NAVY),
    MessageMarkerComponent,
));

You can instead use:

use bundle_bundle::BundleBundleExt;

commands.spawn(
    Text2dBundle::from_section("message", text_style)
    .bundle(BackgroundColor(Color::NAVY))
    .bundle(MessageMarkerComponent)
);

Examples

cargo run --example hello_world
Commit count: 3

cargo fmt