Cargo Features
[dependencies]
SafeManuallyDrop = { version = "1.0.3", default-features = false, features = ["always_check_in_case_debug_assertions", "always_safe_manuallydrop", "allow_fullinternal_debug_assertions", "always_build_flagstable", "support_hookfn_trig", "support_count_trig", "support_abort_trig", "support_panic_trig", "support_istrig_loop", "always_compatible_stdapi", "always_deftrig_panic", "always_deftrig_abort", "always_deftrig_hookfn", "always_deftrig_count", "always_deftrig_loop"] }
- default = always_build_flagstable, always_check_in…debug_assertions, always_compatible_stdapi, always_deftrig_hookfn, support_hookfn_trig, support_istrig_loop, support_panic_trig
-
These default features are set whenever
SafeManuallyDrop
is added without
somewhere in the dependency tree.default-features = false - always_check_in_case_debug_assertions default
-
ManuallyDrop and AutoManuallyDrop are always type safe and are automatically checked on use if the debug_assertions flag is enabled (the flag is automatically enabled if test build, debug build, or env: CARGO_PROFILE_RELEASE_DEBUG_ASSERTIONS=true).
(Also, AlwaysSafeManuallyDrop is always checked for safety when it is used, regardless of the flags.) - always_safe_manuallydrop
-
ManuallyDrop and AutoManuallyDrop are always checked when used,
regardless of external flags.
(Also, AlwaysSafeManuallyDrop is always checked for safety when it is used, regardless of the flags.) - allow_fullinternal_debug_assertions
-
Enable additional internal checks of the SafeManuallyDrop library when the debug_assertions flag is enabled (does not depend on the always_check_in_case_debug_assertions and always_safe_manuallydrop options). This flag type only applies to internal library function checks, it is independent of ManuallyDrop and its valid or invalid usage.
- always_build_flagstable default
-
Always create a modular table of library flags used in the build.
(crate::core::flags) - support_hookfn_trig default
-
Affects
auto_detect_deftrig::DefTrigManuallyDrop
,trig::hook
,SafeManuallyDrop::AlwaysSafeHookManuallyDrop
,SafeManuallyDrop::AutoSafeHookManuallyDrop
,auto_detect_deftrig::DefTrigManuallyDrop
… - support_count_trig
-
Support for CounterManuallyDrop, in case of undefined behavior,
CounterManuallyDrop will add +1 to the counter.Affects
trig::counter
,SafeManuallyDrop::AlwaysSafeCounterManuallyDrop
,SafeManuallyDrop::AutoSafeCounterManuallyDrop
,auto_detect_deftrig::DefTrigManuallyDrop
… - support_abort_trig
-
Support for AbortManuallyDrop, in case of undefined behavior of ManuallyDrop there will be a abort. (Note that this feature requires std.)
Affects
auto_detect_deftrig::DefTrigManuallyDrop
,trig::abort
,SafeManuallyDrop::AlwaysSafeAbortManuallyDrop
,SafeManuallyDrop::AutoSafeAbortManuallyDrop
,auto_detect_deftrig::DefTrigManuallyDrop
… - support_panic_trig default
-
Support for PanicManuallyDrop, in case of undefined behavior of ManuallyDrop there will be a panic.
Affects
auto_detect_deftrig::DefTrigManuallyDrop
,trig::panic
,SafeManuallyDrop::AlwaysSafePanicManuallyDrop
,SafeManuallyDrop::AutoSafePanicManuallyDrop
,auto_detect_deftrig::DefTrigManuallyDrop
… - support_istrig_loop default
-
Ability to determine if an empty loop trigger has been executed.
Affects
loop::trig_next_invalid_beh
,loop::is_trig_next_invalid_beh
… - always_compatible_stdapi default
-
Preserve unsafe fn flags even if functions are safe (may be required for additional compatibility with the standard API)
- always_deftrig_panic
-
The behavior for the simple AutoSafeManuallyDrop/AlwaysSafeManuallyDrop/ManuallyDrop type will always cause a panic in case of undefined behavior.
- always_deftrig_abort
-
The behavior for the simple AutoSafeManuallyDrop/AlwaysSafeManuallyDrop/ManuallyDrop type will always cause a abort in case of undefined behavior.
- always_deftrig_hookfn default
-
The behavior for the simple AutoSafeManuallyDrop/AlwaysSafeManuallyDrop/ManuallyDrop type will always call the hook function in case of undefined behavior.
- always_deftrig_count
-
The behavior for the simple AutoSafeManuallyDrop/AlwaysSafeManuallyDrop/ManuallyDrop type will always call the +1 counter function in case of undefined behavior.
- always_deftrig_loop
-
The behavior for the simple type AutoSafeManuallyDrop/AlwaysSafeManuallyDrop/ManuallyDrop will always call the eternal loop function in case of undefined behavior.