pub struct ActorRegistration { /* private fields */ }Expand description
Actor registration record.
Represents a remote actor’s registration with the Org ActionQueue hub. All fields are private with validated constructors.
Implementations§
Source§impl ActorRegistration
impl ActorRegistration
Sourcepub fn new(
actor_id: ActorId,
identity: impl Into<String>,
capabilities: ActorCapabilities,
heartbeat_interval_secs: u64,
) -> Self
pub fn new( actor_id: ActorId, identity: impl Into<String>, capabilities: ActorCapabilities, heartbeat_interval_secs: u64, ) -> Self
Creates a new actor registration with required fields.
Optional fields (department, tenant_id) can be set via builder methods.
§Panics
Panics if identity is empty or heartbeat_interval_secs is 0.
Sourcepub fn with_department(self, department: DepartmentId) -> Self
pub fn with_department(self, department: DepartmentId) -> Self
Attaches a department identifier, returning the modified registration.
Sourcepub fn with_tenant(self, tenant_id: TenantId) -> Self
pub fn with_tenant(self, tenant_id: TenantId) -> Self
Attaches a tenant identifier, returning the modified registration.
Sourcepub fn capabilities(&self) -> &ActorCapabilities
pub fn capabilities(&self) -> &ActorCapabilities
Returns the actor’s declared capabilities.
Sourcepub fn department(&self) -> Option<&DepartmentId>
pub fn department(&self) -> Option<&DepartmentId>
Returns the actor’s department, if any.
Sourcepub fn heartbeat_interval_secs(&self) -> u64
pub fn heartbeat_interval_secs(&self) -> u64
Returns the expected heartbeat interval in seconds.
Trait Implementations§
Source§impl Clone for ActorRegistration
impl Clone for ActorRegistration
Source§fn clone(&self) -> ActorRegistration
fn clone(&self) -> ActorRegistration
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 ActorRegistration
impl Debug for ActorRegistration
Source§impl PartialEq for ActorRegistration
impl PartialEq for ActorRegistration
impl Eq for ActorRegistration
impl StructuralPartialEq for ActorRegistration
Auto Trait Implementations§
impl Freeze for ActorRegistration
impl RefUnwindSafe for ActorRegistration
impl Send for ActorRegistration
impl Sync for ActorRegistration
impl Unpin for ActorRegistration
impl UnsafeUnpin for ActorRegistration
impl UnwindSafe for ActorRegistration
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