pub struct ResidentPolicy {
pub name: String,
pub idle_expiry_secs: u64,
}Expand description
Create-time policy of a named resident run (ADR 0003): a worker that works in told rounds and is resumed from its native session by the next message.
Fields§
§name: StringRepository-scoped name; resolves only among live runs of the same repository. Starts with a lowercase letter, so it is never a run-id prefix.
idle_expiry_secs: u64Seconds after the open round report (worker exited) before idle expiry.
Implementations§
Source§impl ResidentPolicy
impl ResidentPolicy
Sourcepub const MAX_NAME_LEN: usize = 48
pub const MAX_NAME_LEN: usize = 48
Longest accepted resident name.
Sourcepub fn validate_name(name: &str) -> Result<(), String>
pub fn validate_name(name: &str) -> Result<(), String>
Validate a resident name: [a-z][a-z0-9-]*, at most
Self::MAX_NAME_LEN bytes, no trailing or doubled hyphen. The leading
letter keeps names disjoint from run-id prefixes (which start 0-7).
Trait Implementations§
Source§impl Clone for ResidentPolicy
impl Clone for ResidentPolicy
Source§impl Debug for ResidentPolicy
impl Debug for ResidentPolicy
Source§impl<'de> Deserialize<'de> for ResidentPolicy
impl<'de> Deserialize<'de> for ResidentPolicy
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
impl Eq for ResidentPolicy
Source§impl PartialEq for ResidentPolicy
impl PartialEq for ResidentPolicy
Source§impl Serialize for ResidentPolicy
impl Serialize for ResidentPolicy
impl StructuralPartialEq for ResidentPolicy
Auto Trait Implementations§
impl Forget for ResidentPolicy
impl Freeze for ResidentPolicy
impl RefUnwindSafe for ResidentPolicy
impl Send for ResidentPolicy
impl Sync for ResidentPolicy
impl Unpin for ResidentPolicy
impl UnsafeUnpin for ResidentPolicy
impl UnwindSafe for ResidentPolicy
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