pub struct RandomSelector {}Expand description
Select candidates with random number
Trait Implementations§
Source§impl FromConfig<RandomSelectorConfig> for RandomSelector
impl FromConfig<RandomSelectorConfig> for RandomSelector
fn from_config<'async_trait>(
_config: RandomSelectorConfig,
) -> Pin<Box<dyn Future<Output = Result<Self>> + Send + 'async_trait>>where
Self: 'async_trait,
Source§impl<T> Select<T, RandomSelectorConfig> for RandomSelectorwhere
T: Sync,
§Parameters
- T: input
impl<T> Select<T, RandomSelectorConfig> for RandomSelectorwhere
T: Sync,
§Parameters
- T: input
Source§fn select<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 mut self,
_t: &'life1 T,
candidates: &'life2 [&'life3 usize],
) -> Pin<Box<dyn Future<Output = Result<Vec<usize>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn select<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 mut self,
_t: &'life1 T,
candidates: &'life2 [&'life3 usize],
) -> Pin<Box<dyn Future<Output = Result<Vec<usize>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
candidates: index of downstreams
Auto Trait Implementations§
impl Freeze for RandomSelector
impl RefUnwindSafe for RandomSelector
impl Send for RandomSelector
impl Sync for RandomSelector
impl Unpin for RandomSelector
impl UnwindSafe for RandomSelector
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more