Crate ft_sdk

Source
Expand description

This crate can only be used when compiled 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 error::not_found_;
pub use error::server_error_;
pub use error::unauthorised_;
pub use from_request::Config;
pub use from_request::Form;
pub use from_request::FromRequest;
pub use from_request::Host;
pub use from_request::Path;
pub use from_request::Scheme;
pub use from_request::WrappedFromRequest;
pub use session::SessionData;
pub use session::SessionID;

Modules§

auth
chr
data
email
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§

Email
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.
EmailAddress
EmailHandle
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.
EncryptedString
Error
The Error type, a wrapper around a dynamic error type.
PlainText
Rng
SqliteConnection
UserData

Enums§

ConnectionError
DecryptionError
DecryptionError is returned as error when ft_sdk::decrypt fails.
SpecialError

Traits§

Context
Provides the context method for Result.

Functions§

default_connection
default_sqlite
Get a connection to the default sqlite database.
single_error

Type Aliases§

Connection
FormError
FrontendData
Result

Attribute Macros§

data
form
processor
wrapped_processor