Version: dev

functional_update

Stable type · Document types

Tier: stable · Kind: type · Topic: Document types

JuliaTypeScriptPythonRustGo
FunctionalUpdatenot exportedFunctionalUpdateFunctionalUpdateFunctionalUpdate

Julia

struct FunctionalUpdate
FunctionalUpdate(handler_id::AbstractString; read_vars, read_params, config)
FunctionalUpdate

A registered handler that computes a parameter’s new value when its update fires (esm-spec §5.5). It lives on the parameter it writes, so it carries no list of written variables. handler_id is the only registration mechanism in the format.

Source

TypeScript

TypeScript does not export this type.

Python

class FunctionalUpdate
FunctionalUpdate(handler_id: str, read_vars: list[str] = list(), read_params: list[str] = list(), config: dict[str, Any] = dict())

A registered handler computing a parameter’s new value when its update fires (esm-spec §5.4). It lives ON the parameter it writes, so it needs no write list: read_vars / read_params name what the handler reads and config carries its static configuration.

Source

Rust

pub struct FunctionalUpdate {
    pub handler_id: String,
    pub read_vars: Option<Vec<String>>,
    pub read_params: Option<Vec<String>>,
    pub config: Option<Value>,
}

A registered handler computing a parameter’s new value when its update fires (esm-spec §5.5). The 0.x event functional_affect, relocated onto the parameter it writes — which is why it needs no modified_params list: it writes exactly one thing, the parameter carrying it.

Source · Rust docs

Go

type FunctionalUpdate struct {
	HandlerID  string         `json:"handler_id"`
	ReadVars   []string       `json:"read_vars,omitempty"`
	ReadParams []string       `json:"read_params,omitempty"`
	Config     map[string]any `json:"config,omitempty"`
}

FunctionalUpdate is a registered handler that computes a parameter’s new value when its update fires (esm-spec 5.5). It is the 0.x event functional_affect relocated onto the parameter it writes: a handler’s only write channel was modified_params, so moving it here REMOVED that list rather than relocating it.

Source · Go docs