[][src]Module transistor::types

Generic Request/Response Types for Crux. Availables types are:

  • CruxId is the field that receives a String and serielizes it to a EDN Keyword.

Availables types for responses in module types::response are:

  • StateResponse response for Crux REST API at endpoint /state.
  • TxLogResponse response for Crux REST API at endpoint /tx-log. For POSTs, tx__event___tx_events (:crux-tx.event/tx_events) comes with None.
  • TxLogsResponse response is the wrapper for a GET at endpoint /tx-logs, it is a Vector of type TxLogResponse.
  • EntityTxResponse response for Crux REST API at /entity-tx endpoint.
  • EntityHistoryResponse response for Crux REST API at /entity-history.
  • QueryAsyncResponse is a Future response for a query on Crux REST Api at /query, feature async is required.

Available auxiliary Enums for HTTP in module types::http:

  • Enum Action is available in this module.
  • Enum Order is available in this module to be used with entity_history.
  • Enum TimeHistory is available in this module to be used with entity_history_timed.

It is possible to use chrono for time related responses (TxLogResponse, EntityTxResponse, EntityHistoryElement). to use it you need to enable feature `"time".

Re-exports

pub use http::Actions;
pub use http::Order;

Modules

error
http
query
response

Structs

CruxId

Id to use as reference in Crux, similar to ids with Uuid. This id is supposed to be a KEYWORD, Edn::Key.