pub struct ThreadWriterSatellite<'a, 'scope, T>{
delegate: &'a ThreadObjectWriter<'scope, T>,
sender: Sender<T>,
}Expand description
Child writer to allow objects to be written to a threaded writer from multiple threads, allowing parallel feeding of data. It takes a reference to the original thread writer, so it needs to be used with std::thread::scope. The original writer still needs to be closed, and this design ensures that the original cannot be closed until all the children are finished.
Fields§
§delegate: &'a ThreadObjectWriter<'scope, T>§sender: Sender<T>Implementations§
Source§impl<'a, 'scope, T> ThreadWriterSatellite<'a, 'scope, T>
impl<'a, 'scope, T> ThreadWriterSatellite<'a, 'scope, T>
Sourcefn create(
delegate: &'a ThreadObjectWriter<'scope, T>,
) -> ThreadWriterSatellite<'a, 'scope, T>
fn create( delegate: &'a ThreadObjectWriter<'scope, T>, ) -> ThreadWriterSatellite<'a, 'scope, T>
Create a new thread child writer.
Trait Implementations§
Source§impl<'a, 'scope, T> Clone for ThreadWriterSatellite<'a, 'scope, T>
impl<'a, 'scope, T> Clone for ThreadWriterSatellite<'a, 'scope, T>
Source§fn clone(&self) -> ThreadWriterSatellite<'a, 'scope, T>
fn clone(&self) -> ThreadWriterSatellite<'a, 'scope, T>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a, 'scope, T> ObjectWriter<T> for ThreadWriterSatellite<'a, 'scope, T>
impl<'a, 'scope, T> ObjectWriter<T> for ThreadWriterSatellite<'a, 'scope, T>
Auto Trait Implementations§
impl<'a, 'scope, T> Freeze for ThreadWriterSatellite<'a, 'scope, T>
impl<'a, 'scope, T> !RefUnwindSafe for ThreadWriterSatellite<'a, 'scope, T>
impl<'a, 'scope, T> Send for ThreadWriterSatellite<'a, 'scope, T>
impl<'a, 'scope, T> Sync for ThreadWriterSatellite<'a, 'scope, T>
impl<'a, 'scope, T> Unpin for ThreadWriterSatellite<'a, 'scope, T>
impl<'a, 'scope, T> !UnwindSafe for ThreadWriterSatellite<'a, 'scope, T>
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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