Classes

  • struct cnx_adopt_lock_t cnx_adopt_lock_t is a tag type intended for use with scoped lock guards such as CnxUniqueLock and CnxSharedLock, to communicate that the given mutex has already been locked and thus the guard does not need to acquire the lock itself. This is in contrast to the default behavior, where a lock guard will acquire the lock upon its construction.
  • struct cnx_defer_lock_t cnx_defer_lock_t is a tag type intended for use with scoped lock guards such as CnxUniqueLock and CnxSharedLock, to communicate that the guard should defer locking the given mutex until requested to do so. This is in contrast to the default behavior, where a lock guard will acquire the lock upon its construction.
  • struct cnx_string_vtable_t The function vector table of methods associated with CnxString
  • struct cnx_stringview_vtable_t The function vector table of methods associated with CnxStringView
  • struct cnx_try_lock_t cnx_try_lock_t is a tag type intended for use with scoped lock guards such as CnxUniqueLock and CnxSharedLock, to communicate that the guard should only attempt to lock the given mutex (via try_lock), and not block if lock acquisition was unsuccessful. This is in contrast to the default behavior, where a lock guard will unconditionally acquire the lock upon its construction.
  • struct CnxAllocator A CnxAllocator is a convenient abstraction for wrapping memory allocation and deallocation, making it simple and easy to write allocator-configurable and/or allocator aware software.
  • struct CnxClock The CnxClock trait defines the interface that must be implemented by any Cnx-compatible clock. It intentionally mirrors the API of C++'s standard clock types, along with some additional functionality.
  • struct CnxCondvar CnxCondvar provides a higher-level condition variable type, directly comparable to C++'s std::condition_variable, that helps to make writing efficient multi-threaded code simpler and easier.
  • struct CnxDuration CnxDuration represents a duration in a particular unit of time A CnxDuration occurs in a particular unit of time (e.g. seconds, nanoseconds, or years), and can represent a positive or negative amount of that unit
  • struct CnxError CnxError provides an extensible, configurable type for communicating recoverable errors via error codes and error message strings
  • struct CnxFile Cnx type used to manage reading and writing to/from a file, the buffering associated with the file, and closing it when it's no longer used.
  • struct CnxFileOptions Use to specify the access mode and behavior a file should be opened with.
  • struct CnxFormat
  • struct CnxFormatContext CnxFormatContext is the context type used to store parsed format specifier state for passing to the formatting functions CnxFormat.format and CnxFormat.format_with_allocator.
  • struct CnxJThread A CnxJThread is the handle type for OS-level threads which are automatically joined when their handle goes out of scope and use a dedicated stop token to signal to the thread when its execution should end.
  • struct CnxMutex CnxMutex is the generic higher-level mutex type provided by Cnx. It is a simple mutex type suitable for general purpose use (ie, it is not timed, recursive, etc), and is directly comparable to C++'s std::mutex
  • struct CnxMutexInterface
  • struct CnxRatio CnxRatio is a representation of an exact fraction
  • struct CnxRecursiveMutex CnxRecursiveMutex is a higher-level mutex type, directly comparable to C++'s std::recursive_mutex`, for use when an algorithm requires that a thread be able to lock the same mutex multiple times in its control flow. While such an algorithm would cause the thread to deadlock itself when used with a normal mutex, this is the intended task for a recursive mutex. For example, if a recursive algorithm requires synchronization using the same mutex at multiple levels of recursion, and one level of the algorithm can't release the lock before calling the next, a CnxRecursiveMutex would make this type of algorithm possible and prevent the thread from deadlocking itself.
  • struct CnxRecursiveTimedMutex CnxRecursiveTimedMutex is a higher-level mutex type for use when the properties of both a recursive and a timed mutex are necessary for the task at hand. It's directly comparable to C++'s std::recursive_timed_mutex. It allows for both specifying a timeout for lock acquisition as well as recursive lock acquisition on the same thread.
  • struct CnxSharedLock CnxSharedLock provides scoped non-exclusive (shared) locking of higher-level mutexes (eg CnxSharedMutex, CnxSharedTimedMutex) provided by Cnx. It allows for a simple, concise way to acquire the shared lock on a mutex and ensure that lock is released appropriately when the CnxSharedLock exits scope.
  • struct CnxSharedMutex CnxSharedMutex is the generic (it's not timed or recursive) reader-writer mutex provided by Cnx. It's directly comparable to C++'s std::shared_mutex and is suitable for any situation where a reader-writer mutex is necessary.
  • struct CnxSharedMutexInterface
  • struct CnxSharedTimedMutex CnxSharedTimedMutex is a higher-level reader-writer mutex type for use when timed backoff of mutex locking is required, and is directly comparable to C++'s std::shared_timed_mutex. It allows for specifying a timeout, which if reached will cause execution to stop attempting to acquire the lock and signal failure to the caller, instead of blocking indefinitely until the lock was successfully acquired like a tradition mutex. For example, if an algorithm needs reader-writer synchronization, but blocking for longer than X milliseconds when trying to acquire the lock would be problematic, a CnxSharedTimedMutex would be the appropriate mutex type to use.
  • struct CnxString Cnx string type CnxString is a bounds safe, allocator aware, potentially dynamically allocated string type with significantly improved ergonomics over const char*s (aka cstrings), but maintains compatibility with them (CnxString is always null terminated). Provides similar functionality to C++'s std::string, but in C.
  • struct CnxStringConstIterator Cnx string const iterator storage type CnxStringIterator is the underlying storage type used by CnxString for its const iterator type (CnxRandomAccessIterator(const_char_ptr))
  • struct CnxStringIterator Cnx string iterator storage type CnxStringIterator is the underlying storage type used by CnxString for its non-const iterator type (CnxRandomAccessIterator(char_ptr))
  • struct CnxStringView Cnx stringview type. A stringview is a "view" into a CnxString. It allows you to lazily inspect the contents of the string, but not modify them. It is effectively a fat pointer into the contents of the associated CnxString
  • struct CnxStringViewIterator Cnx stringview const iterator storage type CnxStringViewIterator is the underlying storage type used by CnxStringView for its const iterator type (CnxRandomAccessIterator(const_char_ptr))
  • struct CnxTimedMutex CnxTimedMutex is a higher-level mutex type for use when timed backoff of mutex locking is required, and is directly comparable to C++'s std::timed_mutex. It allows for specifying a timeout, which if reached will cause execution to stop attempting to acquire the lock and signal failure to the caller, instead of blocking indefinitely until the lock was successfully acquired like a tradition mutex. For example, if an algorithm needs synchronization, but blocking for longer than X milliseconds when trying to acquire the lock would be problematic, a CnxTimedMutex would be the appropriate mutex type to use.
  • struct CnxTimePoint CnxTimePoint represents a specific point in time, since the UNIX epoch, represented in a particular level of precision
  • struct CnxUniqueLock CnxUniqueLock provides scoped exclusive locking of any higher-level mutexes (eg CnxMutex, CnxSharedMutex, etc.) provided by Cnx. It allows for a simple, concise way to acquire the exclusive lock on a mutex and ensure that lock is released appropriately when the CnxUniqueLock exits scope.