pub struct SchedulerBuilder { /* private fields */ }Expand description
A fluent builder for creating a Scheduler instance.
This pattern provides a clear and readable API for configuring the scheduler
before it is constructed. It is the primary entry point for using the Echo
library.
Implementations§
Source§impl SchedulerBuilder
impl SchedulerBuilder
Sourcepub fn Create() -> Self
pub fn Create() -> Self
Creates a new SchedulerBuilder with default settings.
By default, the worker count is set to the number of logical CPUs on the system, with a minimum of two workers to ensure work-stealing is viable.
Sourcepub fn WithWorkerCount(self, Count: usize) -> Self
pub fn WithWorkerCount(self, Count: usize) -> Self
Sets the total number of worker threads for the scheduler pool.
If Count is 0, it defaults to the number of logical CPUs.
Sourcepub fn WithQueue(self, Name: &str, Limit: Concurrency) -> Self
pub fn WithQueue(self, Name: &str, Limit: Concurrency) -> Self
Configures a named queue with a specific concurrency limit (for future use).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SchedulerBuilder
impl RefUnwindSafe for SchedulerBuilder
impl Send for SchedulerBuilder
impl Sync for SchedulerBuilder
impl Unpin for SchedulerBuilder
impl UnwindSafe for SchedulerBuilder
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