pub struct AttentionProjector { /* private fields */ }Expand description
Stateful arbiter that admits at most one active body prompt.
Implementations§
Source§impl AttentionProjector
impl AttentionProjector
Sourcepub fn new(policy: AttentionPolicy) -> Self
pub fn new(policy: AttentionPolicy) -> Self
Creates an empty projector.
Sourcepub fn offer(
&mut self,
prompt: Prompt,
hour: u8,
online: bool,
) -> AttentionDecision
pub fn offer( &mut self, prompt: Prompt, hour: u8, online: bool, ) -> AttentionDecision
Offers a reduced prompt; offline, dropped, and quiet channels stay silent.
Sourcepub fn acknowledge(&mut self)
pub fn acknowledge(&mut self)
Acknowledges the active prompt without automatically interrupting again.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AttentionProjector
impl RefUnwindSafe for AttentionProjector
impl Send for AttentionProjector
impl Sync for AttentionProjector
impl Unpin for AttentionProjector
impl UnsafeUnpin for AttentionProjector
impl UnwindSafe for AttentionProjector
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