Struct tonari_actor::Capacity
source · pub struct Capacity {
pub normal: Option<usize>,
pub high: Option<usize>,
}
Expand description
Capacity of actor’s normal- and high-priority inboxes.
For each inbox type, None
signifies default capacity of given actor. Converts from usize
.
Fields§
§normal: Option<usize>
§high: Option<usize>
Implementations§
source§impl Capacity
impl Capacity
sourcepub fn of_normal_priority(capacity: usize) -> Self
pub fn of_normal_priority(capacity: usize) -> Self
Set capacity of the normal priority channel, and use default for the high priority one.
sourcepub fn of_high_priority(capacity: usize) -> Self
pub fn of_high_priority(capacity: usize) -> Self
Set capacity of the high priority channel, and use default for the normal priority one.
Trait Implementations§
source§impl From<usize> for Capacity
impl From<usize> for Capacity
Set capacity of both normal and high priority channels to the same amount of messages.