[−][src]Struct kayrx::fiber::BuilderInner
Fields
thread_name: String
Name used for threads spawned by the runtime.
thread_stack_size: Option<usize>
Stack size used for threads spawned by the runtime.
after_start: Option<Arc<dyn Fn() + Send + Sync>>
Callback to run after each thread starts.
before_stop: Option<Arc<dyn Fn() + Send + Sync>>
To run before each worker thread stops
Methods
impl BuilderInner
[src]
pub fn new() -> BuilderInner
[src]
Returns a new runtime builder initialized with default configuration values.
Configuration methods can be chained on the return value.
pub fn enable_all(&mut self) -> &mut Self
[src]
pub fn enable_io(&mut self) -> &mut Self
[src]
pub fn enable_timer(&mut self) -> &mut Self
[src]
pub fn core_threads(&mut self, val: usize) -> &mut Self
[src]
pub fn max_threads(&mut self, val: usize) -> &mut Self
[src]
pub fn thread_name(&mut self, val: impl Into<String>) -> &mut Self
[src]
pub fn thread_stack_size(&mut self, val: usize) -> &mut Self
[src]
pub fn on_thread_start<F>(&mut self, f: F) -> &mut Self where
F: Fn() + Send + Sync + 'static,
[src]
F: Fn() + Send + Sync + 'static,
pub fn on_thread_stop<F>(&mut self, f: F) -> &mut Self where
F: Fn() + Send + Sync + 'static,
[src]
F: Fn() + Send + Sync + 'static,
pub fn build(&mut self) -> Result<RuntimeInner>
[src]
Trait Implementations
impl Debug for BuilderInner
[src]
impl Default for BuilderInner
[src]
Auto Trait Implementations
impl !RefUnwindSafe for BuilderInner
impl Send for BuilderInner
impl Sync for BuilderInner
impl Unpin for BuilderInner
impl !UnwindSafe for BuilderInner
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,