pub enum Callee {
Show 17 variants
Fn(Arc<FnDecl>),
Value(String),
Ctor {
sum: Arc<TypeDecl>,
tag: String,
},
Refine(Arc<TypeDecl>),
Unsafe(Arc<TypeDecl>),
Static(Arc<FnDecl>),
Method(Arc<FnDecl>),
Kernel {
recv: TyId,
op: String,
},
Intrinsic {
ns: &'static str,
op: String,
},
Capability {
cap: String,
op: String,
},
CrossCap {
unit: String,
cap: String,
op: String,
},
Cross {
unit: String,
service: String,
},
AgentInit(String),
Agent {
agent: String,
handler: String,
},
TestService {
service: String,
address: String,
},
Store {
field: String,
op: String,
},
Query {
field: String,
op: String,
role: QueryRole,
},
}Expand description
P6.0 (design/tracks/the-ir.md §6, #1139): a resolved classification of a
call-shaped expression, recorded once by the checker’s own dispatch
(checker::calls) rather than re-derived by each later consumer —
closing R6.10’s duplicated-classification gap between bynk-check and
bynk-emit’s lower_method_call/lower_call.
Adapted to the identity handles this checker already has (Decision A,
ADR 0333, the-ir-callee-in-bynk-check) rather than the reference
document’s DefId/LocalId/VariantId/OpId arena — none of which
exists here, since the Resolve phase that would mint them was never
built (project-model.md §3.4 deferred it to phase 8).
Arc<FnDecl>/Arc<TypeDecl> are already-cheap resolved handles
(ResolvedCommons::fns/types); every other variant’s identity is a
name, exactly as the checker already keys capabilities, store fields,
units, and agents.
Recorded at each dispatch decision as soon as it is known — including on an error sub-branch (an arity mismatch, an undeclared capability) — since the kind of call is fixed by dispatch, not by whether it went on to type-check cleanly.
Variants§
Fn(Arc<FnDecl>)
A free function call.
Value(String)
Applying a function-typed local or parameter (f(x) where f is in
scope, not declared). No stable id exists for a local beyond its
name — the reference’s LocalId presumes the same Resolve phase
Decision A declines to build here.
Ctor
Sum-variant construction, bare (Some(x)) or qualified
(Opt.Some(x)).
Refine(Arc<TypeDecl>)
T.of(value) — the refined/opaque runtime constructor.
Unsafe(Arc<TypeDecl>)
T.unsafe(value) — the opaque constructor, defining-unit only.
Static(Arc<FnDecl>)
A user-declared static method (Type.method(...)).
Method(Arc<FnDecl>)
A user-declared instance method (UFCS), generic or not.
Kernel
A built-in method on a value — the collection/query/stream/
connection/numeric/duration/instant/bytes/string/option/result/
effect kernels, including the refined-receiver fallback (ADR 0168).
recv is the receiver’s own checked type; no KernelOp enum exists
yet in this crate (R6.11), so the operation is named, not typed.
Intrinsic
A built-in static constructor with no declaring type — List.empty,
Map.empty, Int.parse/Float.parse, Duration.millis,
Instant.fromEpochMillis, Bytes.fromUtf8/fromBase64/empty,
Json.decode/encode, Stream.of.
Capability
A same-context capability operation call (Cap.op(...)).
CrossCap
A cross-context capability operation call (B.Cap.op(...) /
Alias.Cap.op(...)).
Cross
A cross-context service call (B.service(...) / Alias.service(...)).
AgentInit(String)
AgentName(key) — agent instance construction. No slot exists for
this in the reference’s own Callee taxonomy (Part 6.5 only names
handler dispatch); added here since this slice covers every call
shape check_call dispatches, not only the ones the reference
anticipated.
Agent
agent.handler(args) — agent handler dispatch.
TestService
A test-body service address (svc.call/svc.<VERB>("/path", …)/
svc.schedule(...)/svc.message(...)). check_test_service_address
always returns None by design (the runner recovers the outcome
type at runtime) — this classification exists purely for a later
consumer (e.g. go-to-definition on the address), not typing.
Store
An effectful <field>.<op>(…) storage operation on a store
Map/Set/Cache/Log/Cell field — R6.5’s own named target
(P6.2, #1143): a mutation detector keyed on this variant, not a
receiver’s bare name, cannot miss a mutation reached through a
non-Ident receiver or false-negative on a shadowed local, the
defect class block_writes_state’s mutating_op still carries.
field is the store field’s own name (no FieldId arena exists —
same adaptation check_store_*_op’s own lookups already use). Note
this is recorded outside calls.rs’s six functions — the
store-field ladder lives directly in checker.rs’s own type_of,
never reaching any of them — extending P6.0’s own recording surface
past the boundary its “Done when” deliberately drew.
Query
A query builder/terminal call that lifts a bare store Map/Log
field into a lazy Query[V] (is_query_op’s own gate,
checker.rs’s type_of) — R6.12’s own named target (P6.2, #1143).
field names the store field being lifted — without it, a chain
rooted at this call (orders.filter(p).count()) would carry no
identity for orders anywhere in the classification, the same
information loss R6.5 exists to close on the write side. role is
read back from the checker’s own typing decision for this exact call
(Ty::Query(_) result ⇒ Builder, anything else ⇒ Terminal), not
a second name-list classifier alongside is_query_op’s. A chained
builder/terminal call on an already-Query-typed receiver
(.filter(p).count()’s own .count()) is not this variant — it
reaches check_method_call’s ordinary kernel dispatch and is
Callee::Kernel already (P6.0); Query here exists only because the
lift call’s own outer expression never passes through any of
calls.rs’s six functions to get one.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Callee
impl RefUnwindSafe for Callee
impl Send for Callee
impl Sync for Callee
impl Unpin for Callee
impl UnsafeUnpin for Callee
impl UnwindSafe for Callee
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,
§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the foreground set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red() and
green(), which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg():
use yansi::{Paint, Color};
painted.fg(Color::White);Set foreground color to white using white().
use yansi::Paint;
painted.white();§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the background set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red() and
on_green(), which have the same functionality but
are pithier.
§Example
Set background color to red using fg():
use yansi::{Paint, Color};
painted.bg(Color::Red);Set background color to red using on_red().
use yansi::Paint;
painted.on_red();§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling [Attribute] value.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold() and
underline(), which have the same functionality
but are pithier.
§Example
Make text bold using attr():
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);Make text bold using using bold().
use yansi::Paint;
painted.bold();§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi [Quirk] value.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask() and
wrap(), which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk():
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);Enable wrapping using wrap().
use yansi::Paint;
painted.wrap();§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
fn clear(&self) -> Painted<&T>
resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the [Condition] value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted only when both stdout and stderr are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);