pub struct ServiceManifest {
pub name: String,
pub version: Option<String>,
pub tables: Vec<TableDefinition>,
pub cells: Vec<CellDefinition>,
pub events: Vec<EventDefinition>,
pub subscriptions: Vec<SubscriptionDefinition>,
pub custom_routes: Vec<CustomRouteDefinition>,
pub mode: ServiceMode,
pub authorization: Option<AuthorizationConfig>,
pub on_migrate: Option<String>,
}Expand description
A service manifest describes the complete definition of a cufflink service. This is generated by the SDK macros from the user’s Rust struct definitions.
Fields§
§name: String§version: Option<String>§tables: Vec<TableDefinition>§cells: Vec<CellDefinition>§events: Vec<EventDefinition>§subscriptions: Vec<SubscriptionDefinition>§custom_routes: Vec<CustomRouteDefinition>§mode: ServiceModeAuthorization configuration (permission areas and default roles).
on_migrate: Option<String>Optional WASM handler invoked between additive and destructive schema phases of a deploy. Used to backfill or restructure data when columns are split, renamed, or have their semantics changed. The handler must be idempotent — it may be re-invoked on retried deploys.
Implementations§
Source§impl ServiceManifest
impl ServiceManifest
Sourcepub fn get_table(&self, name: &str) -> Option<&TableDefinition>
pub fn get_table(&self, name: &str) -> Option<&TableDefinition>
Get table definition by name
Sourcepub fn requires_wasm(&self) -> bool
pub fn requires_wasm(&self) -> bool
Whether this manifest needs a WASM artifact bundled at deploy time.
A WASM module is required when the service runs user code: explicit
mode: wasm, an on_migrate schema hook, table CRUD lifecycle hooks,
or any Wasm subscription/custom-route handler. The CLI uses this to
decide whether to compile a WASM artifact; the platform uses it to
reject deploys that arrive without one.
Sourcepub fn declared_wasm_handlers(&self) -> Vec<&str>
pub fn declared_wasm_handlers(&self) -> Vec<&str>
All handler names this manifest expects the WASM module to export. Used at deploy time to reject manifests whose declared handlers are missing from the bundled binary.
Sourcepub fn schema_hash(&self) -> String
pub fn schema_hash(&self) -> String
Compute a SHA-256 hash of the manifest for change detection
Trait Implementations§
Source§impl Clone for ServiceManifest
impl Clone for ServiceManifest
Source§fn clone(&self) -> ServiceManifest
fn clone(&self) -> ServiceManifest
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more