[−][src]Struct smartpool::channel::MultiChannel
A round-robin multi channel wrapper.
Methods
impl<Inner: Channel> MultiChannel<Inner>
[src]
pub fn from_vec(inner: Vec<Inner>) -> Self
[src]
pub fn new(
count: usize,
factory: impl Fn() -> Inner
) -> Self
[src]
count: usize,
factory: impl Fn() -> Inner
) -> Self
Trait Implementations
impl<Inner: Channel> Channel for MultiChannel<Inner>
[src]
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>> where
Self: Sized,
[src]
Self: Sized,
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<Inner: Channel + Exec> Exec for MultiChannel<Inner>
[src]
fn submit(&self, task: RunningTask)
[src]
fn exec(
&self,
future: impl Future<Item = (), Error = ()> + Send + 'static
)
[src]
&self,
future: impl Future<Item = (), Error = ()> + Send + 'static
)
Execute a future on this channel.
fn exec_push<I: Send + 'static, E: Send + 'static>(
&self,
future: impl Future<Item = I, Error = E> + Send + 'static
) -> PushFutureRecv<I, E>
[src]
&self,
future: impl Future<Item = I, Error = E> + Send + 'static
) -> PushFutureRecv<I, E>
Execute a future on this channel, and push the result to a push future.
impl<Inner: Channel + ExecParam> ExecParam for MultiChannel<Inner>
[src]
type Param = Inner::Param
fn submit(&self, task: RunningTask, param: Self::Param)
[src]
fn exec(
&self,
future: impl Future<Item = (), Error = ()> + Send + 'static,
param: Self::Param
)
[src]
&self,
future: impl Future<Item = (), Error = ()> + Send + 'static,
param: Self::Param
)
Execute a future on this channel.
fn exec_push<I: Send + 'static, E: Send + 'static>(
&self,
future: impl Future<Item = I, Error = E> + Send + 'static,
param: Self::Param
) -> PushFutureRecv<I, E>
[src]
&self,
future: impl Future<Item = I, Error = E> + Send + 'static,
param: Self::Param
) -> PushFutureRecv<I, E>
Execute a future on this channel, and push the result to a push future.
Auto Trait Implementations
impl<Inner> Send for MultiChannel<Inner> where
Inner: Send,
Inner: Send,
impl<Inner> Sync for MultiChannel<Inner> where
Inner: Sync,
Inner: Sync,
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>,