Skip to main content

store_field_kind_at

Function store_field_kind_at 

Source
pub fn store_field_kind_at(
    source: &str,
    recv_end: usize,
    locals: &[LocalBinding],
) -> Option<(String, bool)>
Expand description

#596: the storage-kind vocabulary a bare receiver is eligible for at completion’s <recv>. position — recv_end is the offset just past the receiver identifier (where its dot sat before completion::value_receiver_rewrite dropped it, so source here is that rewritten buffer). Mirrors describe_store_op_at’s by-provenance receiver check (not shadowed by a local, inside the declaring agent’s state scope), but starts from the receiver’s own end offset rather than walking back from an operation token, since completion fires before any member name is typed — and the rewrite’s postcondition already guarantees a bare, non-dot-qualified name reaches here, so unlike describe_store_op_at there is no further is_dot_preceded check to make.

Returns the field’s storage-kind head ("Map", "Cache", "Set", "Cell", "Log") and, for a Map, whether its value type is a held Connection (v0.158, ADR 0184: .entries/.keys/.values are refused on one) — enough for the completion layer to look up each kind’s registry without re-parsing.