Expand description
This crate can only be used when compiling to wasm, and wasm is run by
www.fifthtry.com, or by fastn
, the command
line tool to use help developers build FifthTry Apps or when self-hosting FifthTry Apps.
Re-exports§
pub use auth::UserId;
pub use from_request::Config;
pub use from_request::Form;
pub use from_request::FromRequest;
pub use from_request::Host;
pub use from_request::Json;
pub use from_request::MainPackage;
pub use from_request::Path;
pub use from_request::Scheme;
pub use from_request::WasmPackage;
pub use from_request::WrappedFromRequest;
pub use session::SessionData;
pub use session::SessionID;
Modules§
- auth
- chr
- data
- env
- Functions to interact with the environment.
- form
- from_
request - http
- Functions and types to work with HTTP requests and responses.
- processor
- schema
- session
- utils
- Utility functions for the SDK
Macros§
- anyhow
- Construct an ad-hoc error from a string or existing non-
anyhow
error value. - bail
- Return early with an error.
- ensure
- Return early with an error if a condition is not satisfied.
- not_
found - Create a page not found response.
- println
- Print some data to the server log.
- server_
error - Create a page not found response.
- unauthorised
- Create a page not found response.
Structs§
- add an email to the offline email queue, so that the email can be sent later. these emails get picked up by the email worker.
- Email
Address - Email
Handle - [ft_sdk::send_mail()] returns an EmailHandle, which can be used to cancel the email during the web request. this is useful in case you want to do a cleanup in case a transaction fails, etc.
- Encrypted
String - Error
- The
Error
type, a wrapper around a dynamic error type. - Plain
Text - Rendered
Email - Rng
- Sqlite
- The SQLite backend
- Sqlite
Connection - User
Data
Enums§
- Cancel
Email Error - Connection
Error - Decryption
Error DecryptionError
is returned as error whenft_sdk::decrypt
fails.- Email
Content - The content of the email to send. Most fastn apps should prefer EmailContent::FromMKind as that allows end users of the fastn app to configure the email easily. The EmailContent::Rendered variant is allowed if you want to generate emails though some other mechanism.
- Send
Email Error - Special
Error
Traits§
- Context
- Provides the
context
method forResult
.
Functions§
- default_
connection - default_
sqlite - Get a connection to the default sqlite database.
- single_
error - uuid
- generate UUID with XorShift algorithm
- uuid_
without_ dashes - Generate UUID without dashes, this is useful for URLs, as one can click Alt-Backspace and delete the whole UUID. In the of regular UUID, it will delete only one part of it, and one has to press backspace multiple times to delete the whole UUID, which is annoying.