pub struct DuplicateChannel {
pub client: String,
pub files: Vec<(String, usize)>,
pub instruction_tokens: usize,
}Expand description
One host whose session receives lean-ctx rules (the tool mapping) through more than one channel (A3: exactly one channel per host).
Fields§
§client: StringClient key as in RulesFileCost::clients (claude, cursor, …).
files: Vec<(String, usize)>Auto-loaded files carrying a lean-ctx rules block: (path, lean-ctx tokens).
instruction_tokens: usizeTokens of the full MCP instructions skeleton the host still receives next to those files; 0 when it gets the one-line anchor.
Implementations§
Source§impl DuplicateChannel
impl DuplicateChannel
Sourcepub fn channel_count(&self) -> usize
pub fn channel_count(&self) -> usize
Channels this host pays for every session.
Sourcepub fn excess_tokens(&self) -> usize
pub fn excess_tokens(&self) -> usize
Tokens billed beyond the cheapest single channel.
Trait Implementations§
Source§impl Clone for DuplicateChannel
impl Clone for DuplicateChannel
Source§fn clone(&self) -> DuplicateChannel
fn clone(&self) -> DuplicateChannel
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 Debug for DuplicateChannel
impl Debug for DuplicateChannel
impl Eq for DuplicateChannel
Source§impl PartialEq for DuplicateChannel
impl PartialEq for DuplicateChannel
Source§impl Serialize for DuplicateChannel
impl Serialize for DuplicateChannel
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for DuplicateChannel
Auto Trait Implementations§
impl Forget for DuplicateChannel
impl Freeze for DuplicateChannel
impl Move for DuplicateChannel
impl RefUnwindSafe for DuplicateChannel
impl Send for DuplicateChannelwhere
RawVecInner: Send,
impl Sync for DuplicateChannelwhere
RawVecInner: Sync,
impl Unpin for DuplicateChannel
impl UnsafeUnpin for DuplicateChannelwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<(String, usize)>: UnsafeUnpin,
impl UnwindSafe for DuplicateChannelwhere
RawVecInner: UnwindSafe,
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<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
Compare self to
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> ⓘ
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