1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
//! The native Rust SDK for [Encore](https://encore.dev).
//!
//! Unlike the Go and TypeScript SDKs (which reach the runtime over a C ABI or N-API),
//! this crate links `encore_sdk_core` directly with no marshalling layer.
//!
//! Infrastructure resources are declared as module-scope `static`s using `const`
//! constructors, mirroring Encore's other SDKs:
//!
//! ```ignore
//! use encore::{pubsub, secrets};
//! use encore::storage::postgres;
//! use encore::pubsub::Topic;
//! use serde::{Serialize, Deserialize};
//!
//! static DB: postgres::Database = postgres::Database::new("hello").migrations("./migrations");
//!
//! #[derive(Serialize, Deserialize)]
//! struct SignupEvent { user_id: String }
//!
//! static SIGNUPS: Topic<SignupEvent> = Topic::new("signups");
//!
//! static API_KEY: secrets::Secret = secrets::Secret::new("ApiKey");
//! ```
//!
//! A service is a directory containing an `encore.service.json` (`{ "name": ..., "lang":
//! "rust" }`) and ordinary Rust code.
// For the tests of `#[encore::test]`, whose output names this crate.
extern crate self as encore;
/// The standard logging facade, usable with [`telemetry::log::logger`].
pub use log;
/// The OpenTelemetry API implemented by Encore's tracer and meter providers.
pub use opentelemetry;
pub use ;
/// Marks a test function (like `#[tokio::test]`) and registers it with Encore
/// before it runs. See [`testing`].
///
/// ```ignore
/// #[encore::test]
/// async fn creates_a_user() -> Result<(), encore::Error> {
/// // …
/// }
///
/// #[encore::test(flavor = "multi_thread", worker_threads = 2)]
/// async fn handles_concurrent_requests() {
/// // …
/// }
/// ```
pub use test;
/// Registers `#[encore(sensitive)]` on fields for schema-based redaction.
///
/// This does not change Serde serialization.
///
/// ```
/// #[derive(serde::Serialize, serde::Deserialize, encore::Schema)]
/// struct Signup {
/// user_id: String,
/// #[encore(sensitive)]
/// email: String,
/// }
/// ```
pub use Schema;
pub use app_meta;
pub use ;