Struct sync_splitter::SyncSplitter [] [src]

pub struct SyncSplitter<'a, T: 'a + Sync> { /* fields omitted */ }

A SyncSplitter allows multiple threads to split a mutable slice at the same time.

See the module docs for more information.

Methods

impl<'a, T: 'a + Sync> SyncSplitter<'a, T>
[src]

[src]

Creates a new SyncSplitter from a slice.

Panics

If slice.len() > isize::MAX.

[src]

Pops one mutable reference off the slice and returns it.

Also returns the element's index in the original slice.

Returns None if the underlying slice was exhausted. After that, all future pop calls will return None.

[src]

Pops two mutable references off the slice and returns them.

Also return the returned slice's offset into the original slice.

Returns None if the underlying slice doesn't have enough elements left.

[src]

Pops a mutable slice of a given length and returns it.

Also return the returned slice's offset into the original slice.

Returns None if not enough elements were left in the underlying slice.

[src]

Consumes the splitter and returns the total number of popped elements.

Trait Implementations

impl<'a, T: Sync> Sync for SyncSplitter<'a, T>
[src]