struct

MemoryBudget::ScenarioMemoryContract

Inherits JSON::Serializable::Strict < JSON::Serializable < Struct < Value < Object

Defines a versioned, exact roster of required memory scenarios.

Constructors

new(list_of_policies : Array(ScenarioMemoryPolicy) = [] of ScenarioMemoryPolicy, list_of_required_scenarios : Array(String) = [] of String, schema_version : Int32 = 2)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

list_of_policies
Source
list_of_required_scenarios
Source
policy_for(scenario_name : String) : ScenarioMemoryPolicy

Returns a named policy after the complete contract has been validated.

Source
schema_version
Source
validate_contract

Rejects absent, duplicated, and unsupported policies before execution.

Source