pub struct ActorConfig {
pub name: String,
pub id: String,
pub mailbox_capacity: usize,
pub heartbeat_interval_secs: u64,
pub protected: bool,
}Expand description
Static configuration supplied when creating an actor.
Fields§
§name: StringHuman-readable name.
id: StringHLC-WID for this actor (time-ordered, node-scoped, collision-resistant).
mailbox_capacity: usizeMaximum number of messages buffered in the mailbox.
heartbeat_interval_secs: u64Heartbeat interval in seconds.
protected: boolWhether this actor is protected from external termination.
Implementations§
Source§impl ActorConfig
impl ActorConfig
Sourcepub fn new(name: impl Into<String>) -> Self
pub fn new(name: impl Into<String>) -> Self
Create a config with a fresh HLC-WID derived from name.
Sourcepub fn new_with_node(name: impl Into<String>, node: impl Into<String>) -> Self
pub fn new_with_node(name: impl Into<String>, node: impl Into<String>) -> Self
Create a config with an explicit HLC-WID node segment (e.g. a NATO alphabet name).
The node value is sanitised the same way as in Self::new, then used
verbatim as the node tag in the generated HLC-WID. This makes actor IDs
human-readable and stable across renames.
§Example
ⓘ
ActorConfig::new_with_node("wif-agent", "india")
// → id: "20260303T120000.0001-india"Trait Implementations§
Source§impl Clone for ActorConfig
impl Clone for ActorConfig
Source§fn clone(&self) -> ActorConfig
fn clone(&self) -> ActorConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ActorConfig
impl Debug for ActorConfig
Source§impl<'de> Deserialize<'de> for ActorConfig
impl<'de> Deserialize<'de> for ActorConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ActorConfig
impl RefUnwindSafe for ActorConfig
impl Send for ActorConfig
impl Sync for ActorConfig
impl Unpin for ActorConfig
impl UnwindSafe for ActorConfig
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