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
//! XRPL Hooks API
//!
//! This crate allows you to write XRPL hooks in Rust.
//!
//! Before you begin, it is highly recommended that you read
//! the [official docs](https://xrpl-hooks.readme.io/) carefully.
//!
//! # Examples
//!
//! For a quick start and to view examples,
//! use the [hook template](https://github.com/otov4its/xrpl-hook-template/)

#![no_std]
#![deny(
    warnings,
    clippy::all,
    missing_copy_implementations,
    missing_docs,
    rustdoc::missing_crate_level_docs,
    rustdoc::missing_doc_code_examples,
    non_ascii_idents,
    unreachable_pub
)]
#![doc(test(attr(deny(warnings))))]
#![doc(html_root_url = "https://docs.rs/xrpl-hooks/0.3.0")]

mod macros;

/// # Low-level unsafe C bindings
///
/// Use very carefully if at all necessary.
pub mod _c;

/// XRPL Hooks API
pub mod api;

/// A few utilities
pub mod helpers;

// Prelude
pub use {api::*, helpers::*};

#[cfg(not(test))]
use core::panic::PanicInfo;
/// You should use rollback() instead of native panic!() macro
#[cfg(not(test))]
#[inline(always)]
#[panic_handler]
fn panic(_: &PanicInfo<'_>) -> ! {
    loop {}
}