pub enum HostIter<'a, 'b, HostType: Host> {
ThreadPerHost(&'a mut HostIter<HostType>),
ThreadPerCore(&'a mut HostIter<'b, HostType>),
}
Expand description
Supports iterating over all hosts assigned to this thread.
Variants§
Implementations§
source§impl<'a, 'b, HostType: Host> HostIter<'a, 'b, HostType>
impl<'a, 'b, HostType: Host> HostIter<'a, 'b, HostType>
sourcepub fn for_each<F>(&mut self, f: F)where
F: FnMut(HostType) -> HostType,
pub fn for_each<F>(&mut self, f: F)where
F: FnMut(HostType) -> HostType,
For each Host
, calls f
with the host. The Host
must be returned by the closure. The
ownership of the Host
is transferred in and out of the closure rather than using a mutable
reference since Shadow needs to put the host in a global with 'static
lifetime (the
worker).
Auto Trait Implementations§
impl<'a, 'b, HostType> Freeze for HostIter<'a, 'b, HostType>
impl<'a, 'b, HostType> RefUnwindSafe for HostIter<'a, 'b, HostType>where
HostType: RefUnwindSafe,
impl<'a, 'b, HostType> Send for HostIter<'a, 'b, HostType>
impl<'a, 'b, HostType> Sync for HostIter<'a, 'b, HostType>where
HostType: Sync,
impl<'a, 'b, HostType> Unpin for HostIter<'a, 'b, HostType>
impl<'a, 'b, HostType> !UnwindSafe for HostIter<'a, 'b, HostType>
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