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
//! Provides core functionality for `nstd`.
//!
//! The entire `nstd.core` module is dependency free and makes no use of Rust's [std] library,
//! making it fit for resource constrained/embedded environments.
use NSTDStr;
use nstdapi;
/// Takes advantage of Rust's unwinding behavior by panicking while a thread is already unwinding
/// from a panic, resulting in program abortion.
;
/// Terminates the program immediately in an abnormal fashion.
///
/// This operation will never return.
///
/// # Panics
///
/// This operation will always panic.
pub const !
/// Invokes the runtime's panic handler.
///
/// This operation will never return.
///
/// In contrast to `nstd_core_abort`, which will terminate the program immediately, this method of
/// abortion will begin unwinding the stack (when panic = "unwind"). This can be useful for Rust
/// programs that don't unwind through call frames from foreign languages.
///
/// # Panics
///
/// This function will always panic.
pub const !
/// Invokes the runtime's panic handler with a UTF-8 encoded payload.
///
/// This operation will never return.
///
/// In contrast to `nstd_core_abort`, which will terminate the program immediately, this method of
/// abortion will begin unwinding the stack (when panic = "unwind"). This can be useful for Rust
/// programs that don't unwind through call frames from foreign languages.
///
/// # Parameters:
///
/// - `const NSTDStr *msg` - The message to panic with.
///
/// # Panics
///
/// This function will always panic.
///
/// # Safety
///
/// `msg`'s data must be valid for reads.
pub const unsafe !