pub struct ConversationActor { /* private fields */ }Implementations§
Source§impl ConversationActor
impl ConversationActor
Sourcepub fn handle(&self) -> ConversationHandle
pub fn handle(&self) -> ConversationHandle
Returns a cloneable command handle.
Sourcepub fn pid(&self) -> Result<ParticipantPid, LiminalError>
pub fn pid(&self) -> Result<ParticipantPid, LiminalError>
Returns the current actor PID, restarting after crash when needed.
§Errors
Returns LiminalError when the actor is closed or cannot restart.
Sourcepub fn state(&self) -> Result<ConversationState, LiminalError>
pub fn state(&self) -> Result<ConversationState, LiminalError>
Sourcepub fn receive_timeout(
&self,
timeout: Duration,
) -> Result<Envelope, LiminalError>
pub fn receive_timeout( &self, timeout: Duration, ) -> Result<Envelope, LiminalError>
Receives the next reply from the conversation, bounded by timeout.
Returns LiminalError::ConversationTimeout if no reply arrives in time,
or LiminalError::ParticipantCrashed if a linked participant crashes
while waiting (the crash drains the pending receive immediately).
§Errors
Returns LiminalError on timeout, participant crash, or actor failure.
Sourcepub fn notify_on_participant_exit(
&self,
participant: ParticipantPid,
notifier: SyncSender<Instant>,
) -> Result<(), LiminalError>
pub fn notify_on_participant_exit( &self, participant: ParticipantPid, notifier: SyncSender<Instant>, ) -> Result<(), LiminalError>
Registers a one-shot notifier fired the instant participant’s trapped
EXIT is processed (carrying the observed Instant — a structural link
wakeup, not a poll). If participant is already dead at registration
(it crashed before this call), the recorded EXIT instant is replayed
immediately, so a crash-before-register is never lost. See
[ActorCore::register_exit_notifier].
§Errors
Returns LiminalError when a state or registry lock is poisoned.
Trait Implementations§
Source§impl Clone for ConversationActor
impl Clone for ConversationActor
Source§fn clone(&self) -> ConversationActor
fn clone(&self) -> ConversationActor
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more