pub struct RuntimeContext {
pub tui_mode: bool,
pub daemon_mode: bool,
}Expand description
Runtime mode flags determined at startup from CLI arguments.
This struct is intentionally Copy — it carries only boolean flags
and is passed by value to subsystem initializers. Adding it to function
signatures replaces individual tui_mode: bool parameters and provides
a single extension point for future runtime flags.
§Examples
use zeph_core::RuntimeContext;
let ctx = RuntimeContext { tui_mode: true, daemon_mode: false };
assert!(ctx.suppress_stderr());
let default_ctx = RuntimeContext::default();
assert!(!default_ctx.suppress_stderr());Fields§
§tui_mode: boolTrue when the TUI dashboard is active (ratatui owns stderr).
daemon_mode: boolTrue when running as a headless daemon (a2a feature).
This field is forward-looking: it is set at daemon entry but has no
current consumer beyond RuntimeContext::suppress_stderr. When the
a2a subsystem grows additional mode-aware initializers, they will read
this field rather than threading a new daemon_mode: bool parameter.
Implementations§
Source§impl RuntimeContext
impl RuntimeContext
Sourcepub fn suppress_stderr(&self) -> bool
pub fn suppress_stderr(&self) -> bool
Returns true when stderr output should be suppressed.
Stderr is suppressed when the TUI owns the terminal (raw mode) or when running as a headless daemon with no controlling terminal.
Trait Implementations§
Source§impl Clone for RuntimeContext
impl Clone for RuntimeContext
Source§fn clone(&self) -> RuntimeContext
fn clone(&self) -> RuntimeContext
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RuntimeContext
impl Debug for RuntimeContext
Source§impl Default for RuntimeContext
impl Default for RuntimeContext
Source§fn default() -> RuntimeContext
fn default() -> RuntimeContext
Source§impl PartialEq for RuntimeContext
impl PartialEq for RuntimeContext
impl Copy for RuntimeContext
impl Eq for RuntimeContext
impl StructuralPartialEq for RuntimeContext
Auto Trait Implementations§
impl Freeze for RuntimeContext
impl RefUnwindSafe for RuntimeContext
impl Send for RuntimeContext
impl Sync for RuntimeContext
impl Unpin for RuntimeContext
impl UnsafeUnpin for RuntimeContext
impl UnwindSafe for RuntimeContext
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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>
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>
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request