pub const BYNK_TESTING_SRC: &str = "---\nThe toolchain\'s own test support: an in-memory store whose reads are typed, so\nthe compiler\'s call-site decode of a first-party capability reply (#3458) is\nexercised end to end. It is experimental and not part of the language surface:\nno program is expected to depend on it, and it may change or go in any release.\n---\nadapter bynk.testing {\n\texports capability { TypedReads }\n\n\t---\n\tAn in-memory store of JSON values. `write` stores the boundary encoding of\n\tits value, so `read` and `readOpt` decode what a call put there: a value\n\tstored as one type and read as another does not decode.\n\t---\n\tcapability TypedReads {\n\t\t---\n\t\tStore the JSON text `json` under `key`, as it is, so a test can seed a\n\t\tvalue no type would have written.\n\t\t---\n\t\tfn put(key: String, json: String) -> Effect[()]\n\t\t---\n\t\tStore the encoding of `value` under `key`.\n\t\t---\n\t\tfn write[T: Codable](key: String, value: T) -> Effect[()]\n\t\t---\n\t\tThe value under `key`, decoded as `T`. A missing key, and a value that\n\t\tdoes not decode as `T`, fault.\n\t\t---\n\t\tfn read[T: Codable](key: String) -> Effect[T]\n\t\t---\n\t\tThe value under `key`, decoded as `T`. A missing key, and a value that\n\t\tdoes not decode as `T`, are `None`: the value is read as a miss, and a\n\t\twarning goes to the runtime console.\n\t\t---\n\t\tfn readOpt[T: Codable](key: String) -> Effect[Option[T]] @onUndecodable(miss)\n\t}\n\n\tprovides TypedReads = MemoryTypedReads\n}\n";Expand description
bynk.testing, the typed-read test support. Compiled in only with the
test-support feature, which the toolchain’s own test corpus enables: a
released toolchain does not contain the unit.