pub struct Backend {
pub action_tx: UnboundedSender<UserAction>,
pub event_rx: UnboundedReceiver<UiEvent>,
pub cancel_flag: Arc<AtomicBool>,
pub perm_rx: UnboundedReceiver<PermissionRequest>,
pub permission_enabled: Arc<AtomicBool>,
/* private fields */
}Expand description
A handle to the agent worker task.
Fields§
§action_tx: UnboundedSender<UserAction>§event_rx: UnboundedReceiver<UiEvent>§cancel_flag: Arc<AtomicBool>Shared cancel flag: the UI flips this to true to interrupt an
in-flight turn; the worker’s tokio::select! wakes and aborts.
perm_rx: UnboundedReceiver<PermissionRequest>Goal-161: side-channel for runtime permission requests.
Separate from event_rx because PermissionRequest carries a
oneshot::Sender<bool> which is not PartialEq/Clone.
permission_enabled: Arc<AtomicBool>Goal-161: shared flag that enables/disables the runtime permission
hook. The UI thread can flip this via /permissions on|off.
Implementations§
Source§impl Backend
impl Backend
pub fn spawn() -> Self
pub fn spawn_with_runtime(rt: AgentRuntime) -> Self
Auto Trait Implementations§
impl Freeze for Backend
impl RefUnwindSafe for Backend
impl Send for Backend
impl Sync for Backend
impl Unpin for Backend
impl UnsafeUnpin for Backend
impl UnwindSafe for Backend
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
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more