crux_time

Crates.iocrux_time
lib.rscrux_time
version0.6.0
sourcesrc
created_at2022-12-15 16:51:32.406127
updated_at2024-10-23 09:29:39.912452
descriptionTime capability for use with crux_core
homepage
repositoryhttps://github.com/redbadger/crux/
max_upload_size
id738117
size29,295
Viktor Charypar (charypar)

documentation

README

Crux Time capability

This crate contains the Time capability, which can be used to ask the current time from the Shell.

For an example of how to use the capability, see the integration test.

About Crux Capabilities

Crux capabilities teach Crux how to interact with the shell when performing side effects. They do the following:

  1. define a Request struct to instruct the Shell how to perform the side effect on behalf of the Core
  2. define a Response struct to hold the data returned by the Shell after the side effect has completed
  3. declare one or more convenience methods for invoking the Shell's capability, each of which creates a Command (describing the effect and its continuation) that Crux can "execute"

Note that because Swift has no namespacing, there is currently a requirement to ensure that Request and Response are unambiguously named (e.g. HttpRequest and HttpResponse).

Commit count: 1428

cargo fmt