pub const BYNK_ADAPTER_SRC: &str = "adapter bynk {\n\texports capability { Clock, Random, Logger, Fetch, Secrets }\n\texports transparent { Uuid, Method, FetchError, Request, Response }\n\n\t---\n\tA UUID in canonical 8-4-4-4-12 lowercase-hex form.\n\t---\n\ttype Uuid = String where Matches(\"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\")\n\n\t---\n\tAn HTTP request method.\n\t---\n\ttype Method = enum { Get, Post, Put, Delete }\n\n\t---\n\tWhy an outbound `Fetch.send` failed: a network error or a timeout.\n\t---\n\ttype FetchError = enum { Network, Timeout }\n\n\t---\n\tAn outbound HTTP request, as passed to `Fetch.send`.\n\t---\n\ttype Request = {\n\t\tmethod: Method,\n\t\turl: String,\n\t\tcontentType: Option[String],\n\t\tauthorization: Option[String],\n\t\tbody: Option[String],\n\t}\n\n\t---\n\tAn HTTP response: a status code and a body.\n\t---\n\ttype Response = { status: Int, body: String }\n\n\t---\n\tReads the current wall-clock time, as Unix milliseconds.\n\t---\n\tcapability Clock {\n\t\tfn now() -> Effect[Instant]\n\t}\n\n\t---\n\tA source of randomness \u{2014} fresh UUIDs and bounded integers.\n\t---\n\tcapability Random {\n\t\tfn uuid() -> Effect[Uuid]\n\t\tfn int(lo: Int, hi: Int) -> Effect[Int]\n\t}\n\n\t---\n\tStructured logging at info and error levels.\n\t---\n\tcapability Logger {\n\t\tfn info(msg: String) -> Effect[()]\n\t\tfn error(msg: String) -> Effect[()]\n\t}\n\n\t---\n\tPerforms outbound HTTP requests.\n\t---\n\tcapability Fetch {\n\t\tfn send(req: Request) -> Effect[Result[Response, FetchError]]\n\t}\n\n\t---\n\tReads named secrets from the platform\'s secret store.\n\t---\n\tcapability Secrets {\n\t\tfn get(name: String) -> Effect[Option[String]]\n\t}\n\n\tprovides Clock = ClockProvider\n\n\tprovides Random = RandomProvider\n\n\tprovides Logger = LoggerProvider\n\n\tprovides Fetch = FetchProvider\n\n\tprovides Secrets = SecretsProvider\n}\n";Expand description
The reserved bynk conformance-surface adapter (env-free core). It has no
binding clause — the toolchain supplies one per platform (see
Platform::bynk_binding_source).