Re-exports§
pub use schema::*;
pub use db::*;
pub use models::*;
pub use utility::*;
pub use guild::*;
pub use spellbook::*;
pub use runes::*;
pub use authentication::*;
pub use utils::*;
pub use sys::*;
pub use entity::*;
Modules§
Macros§
- spellbook_
complete - spellbook_
create_ cookie - spellbook_
create_ jwt - spellbook_
email - spellbook_
env_ load - spellbook_
env_ load_ duration - spellbook_
error - spellbook_
generate_ ulid_ bytes - spellbook_
generate_ ulid_ string - spellbook_
get_ global - spellbook_
hazardous_ boolean_ exist_ via_ ulid - ! [Hazardous] ? Macro -> Hazardous_Booleans
- spellbook_
hazardous_ task_ fetch - ? Macro -> Hazardous Task Fetch
- spellbook_
pool - This macro is a utility for working with database connection pools. It tries to retrieve a connection from the provided pool. If successful, the connection is returned for further use. If there’s an error in obtaining a connection, it handles the error by immediately returning an HTTP response with an appropriate error message and status code. This macro ensures a uniform way of handling database pool errors across different parts of an Axum application.
- spellbook_
pool_ conn - spellbook_
sanitize_ fields - In the spellbook_sanitize_fields macro:
- It takes any struct ($struct) and a list of fields within that struct.
- For each field, if it is an Option
and currently has a value (Some), that value is sanitized using the crate::utility::sanitize_string_limit function. - The macro is designed to be reusable for any struct with fields that need sanitizing and can handle multiple fields at once. - This macro simplifies the process of sanitizing multiple fields in a struct, ensuring that each specified field is sanitized if it contains a value. It reduces code repetition and improves readability by abstracting the common pattern of sanitizing multiple optional fields. - spellbook_
ulid - spellbook_
username