struct ShapeTag {
class: Class,
expires_at: Instant,
starved_noted: bool,
}Expand description
What the shaper attached to one queued unit, on a shaped stream.
None on every unit of every unshaped stream, which is what makes “a
session with no ShapeProfile adds nothing to this path” a fact the type
carries rather than a claim a reviewer checks.
Fields§
§class: ClassThe row this unit’s bytes are charged to, and the bucket it draws
from. Resolved per unit at admission — never per stream, because
object_id and every_nth are legal class selectors and a
stream-sticky class would evaluate them on object 0 alone.
expires_at: InstantThe instant this unit goes out anyway: arrived_at plus the
profile’s max_hold, or the engine’s when the profile inherits it.
Under the default Expiry::Deliver that is a clamp, not a drop — so
a starved class is late, never silently lossy, and “delivers zero
bytes” is always a statement about a sampling window.
starved_noted: boolWhether this unit has already been counted against
starved_behind_other_class. Once per unit, not once per wake.