MCPcopy Create free account
hub / github.com/ScriptedAlchemy/tracedecay / coerce_limit

Function coerce_limit

src/dashboard/util.rs:73–75  ·  view source on GitHub ↗

Clamps a user-supplied limit (mirrors `_coerce_limit` in the Python APIs).

(value: Option<i64>, default: i64, maximum: i64)

Source from the content-addressed store, hash-verified

71
72/// Clamps a user-supplied limit (mirrors `_coerce_limit` in the Python APIs).
73pub(crate) fn coerce_limit(value: Option<i64>, default: i64, maximum: i64) -> i64 {
74 value.unwrap_or(default).clamp(1, maximum)
75}
76
77/// `?,?,…` placeholder list for a SQL `IN (…)` clause with `count` entries.
78pub(crate) fn qmarks(count: usize) -> String {

Callers 15

overviewFunction · 0.85
searchFunction · 0.85
sessionFunction · 0.85
timelineFunction · 0.85
compressionFunction · 0.85
payloads_healthFunction · 0.85
listFunction · 0.85
overviewFunction · 0.85
projectionFunction · 0.85
similarityFunction · 0.85
curation_activityFunction · 0.85
curation_runsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected