pub struct ThreadObjectWriterBuilder<W> {
writer: W,
name: String,
capacity: usize,
}
Fields§
§writer: W
§name: String
§capacity: usize
Implementations§
source§impl<W> ThreadObjectWriterBuilder<W>
impl<W> ThreadObjectWriterBuilder<W>
sourcepub fn with_capacity(self, cap: usize) -> Self
pub fn with_capacity(self, cap: usize) -> Self
Set the channel capacity for this thread writer. Defaults to 100.
sourcepub fn with_name<S: Into<Cow<'static, str>>>(self, name: S) -> Self
pub fn with_name<S: Into<Cow<'static, str>>>(self, name: S) -> Self
Set a name for this thread writer for debugging.
sourcepub fn spawn_scoped<'scope, 'env, T>(
self,
scope: &'scope Scope<'scope, 'env>
) -> ThreadObjectWriter<'scope, T>
pub fn spawn_scoped<'scope, 'env, T>( self, scope: &'scope Scope<'scope, 'env> ) -> ThreadObjectWriter<'scope, T>
Spawn the thread writer.
source§impl<W> ThreadObjectWriterBuilder<W>
impl<W> ThreadObjectWriterBuilder<W>
sourcepub fn spawn<T>(self) -> ThreadObjectWriter<'static, T>
pub fn spawn<T>(self) -> ThreadObjectWriter<'static, T>
Spawn the thread writer.
Auto Trait Implementations§
impl<W> RefUnwindSafe for ThreadObjectWriterBuilder<W>where
W: RefUnwindSafe,
impl<W> Send for ThreadObjectWriterBuilder<W>where
W: Send,
impl<W> Sync for ThreadObjectWriterBuilder<W>where
W: Sync,
impl<W> Unpin for ThreadObjectWriterBuilder<W>where
W: Unpin,
impl<W> UnwindSafe for ThreadObjectWriterBuilder<W>where
W: UnwindSafe,
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