pub struct RoleSignals<'a> {
pub explicit_override: Option<ModelRole>,
pub current_tool: Option<&'a str>,
pub thinking_enabled: bool,
pub estimated_tokens: usize,
pub long_context_threshold: usize,
pub is_trivial: bool,
}Expand description
Unstable (feature: role-switching) — may change or be removed
Observable signals for a turn, used to decide the active role.
All fields default sanely via RoleSignals::default; set only what the
caller actually knows.
Fields§
§explicit_override: Option<ModelRole>Explicit user override (e.g. a /model pin). Highest priority.
current_tool: Option<&'a str>Name of the tool currently executing, if any. A tool may declare a role
(see role_for_tool).
thinking_enabled: boolWhether extended thinking is enabled for the turn.
estimated_tokens: usizeEstimated prompt token count for the turn.
long_context_threshold: usizeToken threshold above which the long-context role is selected.
is_trivial: boolWhether the turn is trivially simple (short, single intent).
Trait Implementations§
Source§impl<'a> Clone for RoleSignals<'a>
impl<'a> Clone for RoleSignals<'a>
Source§fn clone(&self) -> RoleSignals<'a>
fn clone(&self) -> RoleSignals<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> Debug for RoleSignals<'a>
impl<'a> Debug for RoleSignals<'a>
Source§impl Default for RoleSignals<'_>
impl Default for RoleSignals<'_>
Source§fn default() -> RoleSignals<'_>
fn default() -> RoleSignals<'_>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<'a> Freeze for RoleSignals<'a>
impl<'a> RefUnwindSafe for RoleSignals<'a>
impl<'a> Send for RoleSignals<'a>
impl<'a> Sync for RoleSignals<'a>
impl<'a> Unpin for RoleSignals<'a>
impl<'a> UnsafeUnpin for RoleSignals<'a>
impl<'a> UnwindSafe for RoleSignals<'a>
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.