Struct tiny_actor::config::Config
source · [−]Expand description
The config used for spawning new processes, made up of a Link and a Capacity. This decides whether the actor will be attached/detached and unbounded/bounded.
Example
use tiny_actor::*;
Config {
link: Link::default(),
capacity: Capacity::default(),
};Default
Attached with an abort-timer of 1 sec.
The capacity is unbounded, with exponential backoff starting 5 messages in the inbox
at 25 ns, with a growth-factor of 1.3.
Fields
link: Linkcapacity: CapacityImplementations
sourceimpl Config
impl Config
pub fn new(link: Link, capacity: Capacity) -> Self
sourcepub fn bounded(capacity: usize) -> Self
pub fn bounded(capacity: usize) -> Self
A config for a default bounded [Channel]:
Config {
link: Link::default(),
capacity: Capacity::Bounded(capacity),
};sourcepub fn detached() -> Self
pub fn detached() -> Self
A default bounded inbox:
Config {
link: Link::Detached,
capacity: Capacity::default(),
};pub fn attached(timeout: Duration) -> Self
Trait Implementations
sourceimpl PartialEq<Config> for Config
impl PartialEq<Config> for Config
impl StructuralPartialEq for Config
Auto Trait Implementations
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more