Skip to main content

Crate nlib

Crate nlib 

Source

Macros§

debug_assert_not_null
Debug-only assertion that a raw pointer is not null.
ok_or
recv_timeout
Receive from an mpsc receiver with a timeout, mapping each outcome to a value.
recv_timeout_ms
Convenience wrapper over recv_timeout! that takes the timeout in milliseconds.
recv_timeout_ms_or_continue
Convenience wrapper over recv_timeout_or_continue! that takes milliseconds.
recv_timeout_or_continue
Receive from an mpsc receiver with a timeout; on timeout, continue the loop.
some_or

Structs§

ExecOnDrop
RAII guard that runs a closure when dropped.
OnceInit
Signal
SyncUnsafeCell
UnsafeCell that is Sync if T: Sync.

Functions§

into_cstring_ptr
Return a malloc’ed C string (caller must free with from_raw), or NULL if None.
reclaim_cstring
Reclaim (free) a heap-allocated C string previously created with CString::into_raw, dropping it at the end of this function.