#[non_exhaustive]pub enum HarnessThreadRule {
FirstPresent(&'static [&'static str]),
DivergentPair {
thread: &'static str,
session: &'static str,
},
}Expand description
How one harness’s request headers name the sub-thread a call was made from.
The two shapes exist because harnesses disagree about what a header’s presence means, and a single flat list of names cannot express both.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
FirstPresent(&'static [&'static str])
The harness stamps a dedicated header only on sub-thread calls, so presence is the whole signal. Names are tried in order; the first one present with a non-empty value wins.
DivergentPair
The harness stamps both headers on every call, and the sub-thread signal is their divergence rather than either one’s presence.
Both must be present and differ. Each guard earns its place:
- An equal pair is a root turn. Codex sets
thread-id==session-idthere, so a flat first-present entry forthread-idwould stamp a thread id on every root turn — which is not cosmetic: downstream, a non-empty thread id routes the root spine off the main spine and silently degrades the session’s derived status. - A lone thread id, with no session id beside it, is not a recognised shape for this harness at all. Treating it as a sub-thread would risk that same misrouting on evidence the rule cannot confirm, so it resolves to nothing instead.
Implementations§
Trait Implementations§
Source§impl Clone for HarnessThreadRule
impl Clone for HarnessThreadRule
Source§fn clone(&self) -> HarnessThreadRule
fn clone(&self) -> HarnessThreadRule
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 moreimpl Copy for HarnessThreadRule
Source§impl Debug for HarnessThreadRule
impl Debug for HarnessThreadRule
impl Eq for HarnessThreadRule
Source§impl PartialEq for HarnessThreadRule
impl PartialEq for HarnessThreadRule
impl StructuralPartialEq for HarnessThreadRule
Auto Trait Implementations§
impl Freeze for HarnessThreadRule
impl RefUnwindSafe for HarnessThreadRule
impl Send for HarnessThreadRule
impl Sync for HarnessThreadRule
impl Unpin for HarnessThreadRule
impl UnsafeUnpin for HarnessThreadRule
impl UnwindSafe for HarnessThreadRule
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