fn marked<M>(self) -> Self
    where
        M: Marker,
    {
        let entity = self.entity;
        self.lazy.exec(move |world| {
            let mut alloc = world.write_resource::<M::Allocator>();
            alloc.mark(entity, &mut world.write_storage::<M>());
        });

        self
    }
/// Add a `Marker` to the entity by fetching the associated allocator.
///
/// This will be applied on the next `world.maintain()`.
///
/// ## Examples
///
/// ```rust
/// use specs::{
///     prelude::*,
///     saveload::{MarkedBuilder, SimpleMarker, SimpleMarkerAllocator},
/// };
///
/// struct NetworkSync;
///
/// let mut world = World::new();
/// world.register::<SimpleMarker<NetworkSync>>();
/// world.insert(SimpleMarkerAllocator::<NetworkSync>::new());
///
/// # let lazy = world.read_resource::<LazyUpdate>();
/// # let entities = world.entities();
/// let my_entity = lazy
///     .create_entity(&entities)
///     /* .with(Component1) */
///     .marked::<SimpleMarker<NetworkSync>>()
///     .build();
/// ```
///
/// ## Panics
///
/// Panics during `world.maintain()` in case there's no allocator
/// added to the `World`.
Add a `Marker` to the entity by fetching the associated allocator.
This will be applied on the next `world.maintain()`.
Add a ` Marker ` to the entity by fetching the associated allocator . This will be applied on the next ` world . maintain () ` .
fn marked<M>(self) -> Self
    where
        M: Marker,
    {
        let entity = self.entity;
        self.lazy.exec(move |world| {
            let mut alloc = world.write_resource::<M::Allocator>();
            alloc.mark(entity, &mut world.write_storage::<M>());
        });
        self
    }
fn marked < M > ( self ) -> Self where M : Marker , { let entity = self . entity ; self . lazy . exec ( move | world | { let mut alloc = world . write_resource :: < M :: Allocator > ( ) ; alloc . mark ( entity , & mut world . write_storage :: < M > ( ) ) ; } ) ; self }
Add a `Marker` to the entity by fetching the associated allocator.
Add a ` Marker ` to the entity by fetching the associated allocator .
self
examples
```rust
use specs::{
prelude::*,
saveload::{MarkedBuilder, SimpleMarker, SimpleMarkerAllocator},
}.

struct NetworkSync.

let mut world = World::new();
world.register::>();
world.insert(SimpleMarkerAllocator::::new()).
` ` ` rust use specs :: { prelude :: * saveload :: { MarkedBuilder SimpleMarker SimpleMarkerAllocator } } . struct NetworkSync . let mut world = World :: new () ; world . register :: > () ; world . insert ( SimpleMarkerAllocator :::: new () ) .
let lazy = world.read_resource::<lazyupdate>();
None
let entities = world.entities();
let my_entity = lazy
.create_entity(&entities)
.with(Component1)
.marked::>()
.build();
```
let my_entity = lazy . create_entity ( &entities ) . with ( Component1 ) . marked :: > () . build () ; ` ` `
panics
Panics during `world.maintain()` in case there's no allocator
added to the `World`.
Panics during ` world . maintain () ` in case there ' s no allocator added to the ` World ` .