pub fn split<T: IntoView>(&mut self) -> (SubWorld<'_>, SubWorld<'_>) {
        let permissions = T::View::requires_permissions();
        let (left, right) = ComponentAccess::All.split(permissions);

        // safety: exclusive access to world, and we have split each subworld into disjoint sections
        unsafe {
            (
                SubWorld::new_unchecked(self, left, None),
                SubWorld::new_unchecked(self, right, None),
            )
        }
    }
/// Splits the world into two. The left world allows access only to the data declared by the
/// view; the right world allows access to all else.
///
/// # Examples
///
/// ```
/// # use nh_ecs::*;
/// # struct Position;
/// # let mut world = World::default();
/// let (left, right) = world.split::<&mut Position>();
/// ```
///
/// With the above, 'left' contains a sub-world with access _only_ to `&Position` and `&mut
/// Position`, and `right` contains a sub-world with access to everything _but_ `&Position` and
/// `&mut Position`.
///
/// ```
/// # use nh_ecs::*;
/// # struct Position;
/// # let mut world = World::default();
/// let (left, right) = world.split::<&Position>();
/// ```
///
/// In this second example, `left` is provided access _only_ to `&Position`. `right` is granted
/// permission to everything _but_ `&mut Position`.
Splits the world into two. The left world allows access only to the data declared by the
view; the right world allows access to all else.
Splits the world into two . The left world allows access only to the data declared by the view ; the right world allows access to all else .
pub fn split<T: IntoView>(&mut self) -> (SubWorld<'_>, SubWorld<'_>) {
        let permissions = T::View::requires_permissions();
        let (left, right) = ComponentAccess::All.split(permissions);
        // safety: exclusive access to world, and we have split each subworld into disjoint sections
        unsafe {
            (
                SubWorld::new_unchecked(self, left, None),
                SubWorld::new_unchecked(self, right, None),
            )
        }
    }
pub fn split < T : IntoView > ( & mut self ) -> ( SubWorld < ' _ > , SubWorld < ' _ > ) { let permissions = T :: View :: requires_permissions ( ) ; let ( left , right ) = ComponentAccess :: All . split ( permissions ) ; // safety: exclusive access to world, and we have split each subworld into disjoint sections unsafe { ( SubWorld :: new_unchecked ( self , left , None ) , SubWorld :: new_unchecked ( self , right , None ) , ) } }
Splits the world into two.
Splits the world into two .
&mut self
&mut self
examples
None
use nh_ecs::*;
None
struct position;
None
let mut world = world::default();
let (left, right) = world.split::<&mut Position>();
```

With the above, 'left' contains a sub-world with access _only_ to `&Position` and `&mut
Position`, and `right` contains a sub-world with access to everything _but_ `&Position` and
`&mut Position`.


let ( left right ) = world . split :: <&mut Position > () ; ` ` ` With the above ' left ' contains a sub - world with access _only_ to ` &Position ` and ` &mut Position ` and ` right ` contains a sub - world with access to everything _but_ ` &Position ` and ` &mut Position ` .
use nh_ecs::*;
None
struct position;
None
let mut world = world::default();
let (left, right) = world.split::<&Position>();
```

In this second example, `left` is provided access _only_ to `&Position`. `right` is granted
permission to everything _but_ `&mut Position`.
let ( left right ) = world . split :: <&Position > () ; ` ` ` In this second example ` left ` is provided access _only_ to ` &Position ` . ` right ` is granted permission to everything _but_ ` &mut Position ` .