[−][src]Struct smartpool_spatial::SpatialChannel
A priority channel based on the manhattan tree, where each task corresponds to a coordinate in some coordinate space. A shared, atomic coordinate focus is stored, which can be shared between multiple SpatialChannels, and modified externally. The SpatialChannel will always execute the task with the lowest manhattan distance to the current value of the focus.
Fields
focus: Arc<Atomic<S::Coord>>
Methods
impl<S: CoordSpace> SpatialChannel<S> where
S::Coord: Copy,
[src]
S::Coord: Copy,
Trait Implementations
impl<S: CoordSpace + Default> Default for SpatialChannel<S> where
S::Coord: Copy + ZeroCoord,
[src]
S::Coord: Copy + ZeroCoord,
impl<S: CoordSpace> Channel for SpatialChannel<S> where
S::Coord: Copy,
[src]
S::Coord: Copy,
fn assign_bits(
&mut self,
assigner: &mut BitAssigner
) -> Result<(), NotEnoughBits>
[src]
&mut self,
assigner: &mut BitAssigner
) -> Result<(), NotEnoughBits>
fn poll(&self) -> Option<RunningTask>
[src]
fn into_shared(self) -> Arc<RwLock<Self>>
[src]
Wrap self in a reference counted read/write lock, which is still a channel, and can have shared ownership, allowing it to be used in a scheduler. Read more
impl<S: CoordSpace> ExecParam for SpatialChannel<S> where
S::Coord: Copy,
[src]
S::Coord: Copy,
type Param = S::Coord
fn submit(&self, task: RunningTask, param: S::Coord)
[src]
fn exec<impl Future- + Send + 'static>(
&self,
future: impl Future- + Send + 'static,
param: Self::Param
) where
impl Future- + Send + 'static: 'static + Send + Future<Item = (), Error = ()>,
[src]
&self,
future: impl Future
param: Self::Param
) where
impl Future
Execute a future on this channel.
fn exec_push<I, E, impl Future- + Send + 'static>(
&self,
future: impl Future- + Send + 'static,
param: Self::Param
) -> PushFutureRecv<I, E> where
E: 'static + Send,
I: 'static + Send,
impl Future- + Send + 'static: 'static + Send + Future<Item = I, Error = E>,
[src]
&self,
future: impl Future
param: Self::Param
) -> PushFutureRecv<I, E> where
E: 'static + Send,
I: 'static + Send,
impl Future
Execute a future on this channel, and push the result to a push future.
Auto Trait Implementations
impl<S> Send for SpatialChannel<S> where
S: Send,
<S as CoordSpace>::Coord: Send,
S: Send,
<S as CoordSpace>::Coord: Send,
impl<S> Sync for SpatialChannel<S> where
S: Send,
<S as CoordSpace>::Coord: Send,
S: Send,
<S as CoordSpace>::Coord: Send,
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,