pub enum Allocator {
Thread(Thread),
Process(Process),
Tcp(TcpAllocator),
}Expand description
Enumerates known implementors of Allocate.
Passes trait method calls on to members.
Variants§
Thread(Thread)
Intra-thread allocator.
Process(Process)
Inter-thread, intra-process allocator (in either of two flavors, see Process).
Tcp(TcpAllocator)
Inter-process allocator (TCP-based, with a Process as its intra-process inner).
Implementations§
Source§impl Allocator
impl Allocator
Sourcepub fn allocate<T>(
&mut self,
identifier: usize,
) -> (Vec<Box<dyn Push<T>>>, Box<dyn Pull<T>>)where
T: Exchangeable,
pub fn allocate<T>(
&mut self,
identifier: usize,
) -> (Vec<Box<dyn Push<T>>>, Box<dyn Pull<T>>)where
T: Exchangeable,
Constructs several send endpoints and one receive endpoint.
Sourcepub fn broadcast<T>(
&mut self,
identifier: usize,
) -> (Box<dyn Push<T>>, Box<dyn Pull<T>>)where
T: Exchangeable + Clone,
pub fn broadcast<T>(
&mut self,
identifier: usize,
) -> (Box<dyn Push<T>>, Box<dyn Pull<T>>)where
T: Exchangeable + Clone,
Constructs several send endpoints and one receive endpoint.
Sourcepub fn await_events(&self, duration: Option<Duration>)
pub fn await_events(&self, duration: Option<Duration>)
Awaits communication events.
Sourcepub fn pipeline<T>(
&mut self,
identifier: usize,
) -> (Pusher<T, Pusher<T>>, Puller<T, Puller<T>>)where
T: 'static,
pub fn pipeline<T>(
&mut self,
identifier: usize,
) -> (Pusher<T, Pusher<T>>, Puller<T, Puller<T>>)where
T: 'static,
Constructs a pipeline channel from the worker to itself.
By default, this method uses the thread-local channel constructor
based on a shared VecDeque which updates the event queue.
Auto Trait Implementations§
impl Freeze for Allocator
impl !RefUnwindSafe for Allocator
impl !Send for Allocator
impl !Sync for Allocator
impl Unpin for Allocator
impl UnsafeUnpin for Allocator
impl !UnwindSafe for Allocator
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more