[][src]Struct kayrx::fiber::BuilderInner

pub struct BuilderInner {
    pub thread_name: String,
    pub thread_stack_size: Option<usize>,
    pub after_start: Option<Arc<dyn Fn() + Send + Sync>>,
    pub before_stop: Option<Arc<dyn Fn() + Send + Sync>>,
    // some fields omitted
}

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]

pub fn on_thread_stop<F>(&mut self, f: F) -> &mut Self where
    F: Fn() + Send + Sync + 'static, 
[src]

pub fn build(&mut self) -> Result<RuntimeInner>[src]

Trait Implementations

impl Debug for BuilderInner[src]

impl Default for BuilderInner[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,