pub trait ManagedResource: Sized {
const TABLE: &'static str;
const REF_COL: &'static str;
const AGENT_REF_TABLE: &'static str;
const BUNDLE_REF_TABLE: &'static str;
const COLUMNS: &'static [&'static str];
const UPDATE_COLUMNS: &'static [&'static str];
const NAME_NOUN: &'static str;
const ARTICLE_NOUN: &'static str;
const KIND: &'static str;
// Required methods
fn from_row(row: &Row<'_>) -> Result<Self>;
fn values(&self) -> Vec<Value>;
fn id(&self) -> &str;
fn name(&self) -> &str;
fn is_global(&self) -> bool;
fn updated_at(&self) -> i64;
}Expand description
One managed primitive: its catalog row type plus the names that differ between primitives.
Required Associated Constants§
Sourceconst AGENT_REF_TABLE: &'static str
const AGENT_REF_TABLE: &'static str
Agent-level ref table (agent_id, REF_COL), e.g. db_agent_skills_ref.
Sourceconst BUNDLE_REF_TABLE: &'static str
const BUNDLE_REF_TABLE: &'static str
Bundle-level ref table (bundle_id, REF_COL), e.g. db_bundle_skills_ref.
Sourceconst COLUMNS: &'static [&'static str]
const COLUMNS: &'static [&'static str]
Every column of TABLE, in the order from_row reads them and
values produces them. Must include id, name, is_global,
created_at and updated_at.
Sourceconst UPDATE_COLUMNS: &'static [&'static str]
const UPDATE_COLUMNS: &'static [&'static str]
Columns rewritten by ON CONFLICT(id) DO UPDATE — everything a caller
may edit; never id, is_global or created_at.
Sourceconst ARTICLE_NOUN: &'static str
const ARTICLE_NOUN: &'static str
Noun with article in bundle errors: “cannot bind an MCP server to…”.
Required Methods§
Sourcefn from_row(row: &Row<'_>) -> Result<Self>
fn from_row(row: &Row<'_>) -> Result<Self>
Read one row whose leading columns are COLUMNS, in order, from 0.
fn id(&self) -> &str
fn name(&self) -> &str
Sourcefn is_global(&self) -> bool
fn is_global(&self) -> bool
Whether this row is a global (catalog-wide) row. Needed by
managed_list’s in-memory sort, now that combining a global set with
a private set can no longer happen inside one ORDER BY (Phase 2 of
SPEC_DURABLE_BINDINGS_2026_09_10.md).
Sourcefn updated_at(&self) -> i64
fn updated_at(&self) -> i64
Last-updated timestamp, for the same in-memory sort as is_global.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".