batt
batt🔗
Namespaces🔗
Name |
---|
batt::constants |
batt::detail |
batt::features |
batt::int_types |
batt::seq |
Classes🔗
Name | |
---|---|
class | batt::BasicRunningTotal |
struct | batt::RetryState |
struct | batt::ExponentialBackoff |
struct | batt::TaskSleepImpl |
struct | batt::DefaultStatusIsRetryableImpl |
class | batt::BasicExecutor |
class | batt::SingleBufferSource Adapts a single ConstBuffer to be a BufferSource. |
class | batt::BufferSource |
class | batt::SeqBufferSource |
class | batt::TakeNSource |
class | batt::FilterBufferSource |
class | batt::MapBufferSource |
class | batt::PrependBufferSource |
class | batt::BufferedChannel |
class | batt::CancelToken Enables effective cancellation of arbitrary async operations. |
class | batt::Channel A Channel |
class | batt::AbstractStackAllocator |
class | batt::StackAllocatorImpl |
class | batt::StackAllocator |
class | batt::DebugInfoFrame |
class | batt::BasicFakeExecutor |
class | batt::FakeExecutionContext |
class | batt::FakeTaskScheduler |
class | batt::FakeTimeService |
class | batt::BasicScopedChunk A fetched chunk of data that is automatically consumed (partially or entirely) when it goes out of scope. |
class | batt::Promise An obligation to provide a value of type T to a Future. |
class | batt::Future A value of type T that will be provided at some point in the future. |
class | batt::BasicAbstractHandler A type-erased async completion handler with linked list pointers. |
class | batt::BasicHandlerImpl |
class | batt::UniqueHandler |
class | batt::HandlerBinder |
class | batt::HandlerMemoryBase Abstract base for HandlerMemory |
class | batt::HandlerMemory A chunk of memory that can be attached to an async completion handler. |
class | batt::HandlerAllocator An allocator associated with a completion handler. |
class | batt::CustomAllocHandler Wrapper for an async completion handler type Handler . |
class | batt::InlineSubTask A scoped asynchronous task with inline stack memory. |
class | batt::IOResult |
class | batt::Latch A write-once, single-value synchronized container. |
class | batt::LazyLatch A write-once, single-value synchronized container that is populated lazily by an init_fn when the value is requested. |
class | batt::BasicMCSMutex A fair mutual exclusion lock based on the MCS lock algorithm. |
class | batt::MutexBase Base class of typed Mutex |
class | batt::LockBase |
class | batt::ScopedLock |
class | batt::Mutex Provides mutually-exclusive access to an instance of type T . |
class | batt::Pinnable |
class | batt::Pin |
class | batt::PinnablePtr A raw pointer augmented to support the batt::Pinnable interface, so that a batt::Pin |
class | batt::PreallocatedTask |
class | batt::PriorityWatch |
class | batt::QueueBase Type-agnostic base class for all Queue types. |
class | batt::Queue Unbounded multi-producer/multi-consumer (MPMC) FIFO queue. |
class | batt::BasicRateLimiter |
struct | batt::DumpReadWriteLockState |
class | batt::BasicReadWriteLock An MCS-style fair reader/writer lock. |
class | batt::ScopedReadWriteLockImpl |
class | batt::ReadWriteMutex Mutex wrapper for a value of type T, providing exclusive read/write access and non-exclusive read-only access. |
class | batt::Runtime |
class | batt::ScalableGrantIssuer A pool from which ScalableGrant instances are allocated. |
class | batt::ScalableGrant A claim on some counted resource. |
class | batt::SimpleExecutionContext A minimal multi-threaded execution context implementation, suitable for parallel-compute thread pools. |
struct | batt::WorkSliceParams |
struct | batt::WorkSlicePlan |
class | batt::SpinGrant A claim on some counted resource. |
class | batt::StreamBuffer |
class | batt::Task A user-space cooperatively scheduled thread of control. |
class | batt::TaskScheduler |
class | batt::NullTaskScheduler |
class | batt::Watch A batt::Watch is like a std::atomic that you can block on, synchronously and asynchronously; see also batt::WatchAtomic. |
struct | batt::HoldOwnership |
struct | batt::ReleaseOwnership |
class | batt::WatchAtomic Watch for atomic primitive type. |
class | batt::Watch< bool > |
class | batt::Watch< i8 > |
class | batt::Watch< i16 > |
class | batt::Watch< i32 > |
class | batt::Watch< i64 > |
class | batt::Watch< u8 > |
class | batt::Watch< u16 > |
class | batt::Watch< u32 > |
class | batt::Watch< u64 > |
class | batt::Watch< void * > |
class | batt::Watch< T * > |
class | batt::WorkContext |
class | batt::ScopedWorkContext |
class | batt::Worker |
class | batt::WorkerPool |
class | batt::ScopedWorkerThreadPool |
class | batt::AtomicCounterGauge An atomic variable that maintains a gauge-like value, which can rise and fall over time, by means of two monotonic counters: one for increases, one for decreases. |
struct | batt::LeastUpperBound |
struct | batt::GreatestLowerBound |
class | batt::ManagedBuffer |
class | batt::BufferViewImpl |
class | batt::ConstBufferView |
class | batt::MutableBufferView |
class | batt::CaseOfVisitor |
class | batt::CpuCacheLineIsolated |
struct | batt::ThreadPoolConfig |
struct | batt::DoNothing |
struct | batt::ByteSwap |
class | batt::StatusException Exception wrapper for a batt::Status value. |
class | batt::FinalAct |
struct | batt::HostAddress |
class | batt::HttpChunkDecoder BufferSource transformer that decodes HTTP chunked content fetched from Src . |
class | batt::HttpClient An HTTP/1.1 client implementation. |
class | batt::DefaultHttpClient A singleton instance of HttpClient; contains an io_context and thread pool (size == 1). |
class | batt::BasicHttpClientConnection |
class | batt::HttpClientHostContext |
struct | batt::HttpData |
class | batt::HttpMessageBase The common base type for HttpRequest and HttpResponse. |
struct | batt::HttpMessageInfo A summary of information about a response message that is necessary for the connection to correctly handle it. |
class | batt::HttpRequest |
class | batt::HttpResponse |
class | batt::HttpServerConnection |
class | batt::HttpServer An HTTP server. |
struct | batt::HttpServerSettings |
struct | batt::HttpVersion |
class | batt::SslTransport An SSL/TLS based transport for HTTPS clients. |
class | batt::TcpTransport A thread-safe socket based TCP connection for HTTP clients. |
class | batt::InstanceCounter A quick and easy way to track the number of instances of a given type in existence; just add batt::InstanceCounter |
struct | batt::IClosedOpen |
struct | batt::IClosed |
struct | batt::BasicInterval A set of totally ordered values, defined by a lower and upper bound. |
struct | batt::IntervalTraits |
struct | batt::IntervalTraitsBase |
struct | batt::IntervalTraits< T, U, InclusiveLowerBound::kTrue, InclusiveUpperBound::kFalse, OrderFn, EqualFn > |
struct | batt::IntervalTraits< T, U, InclusiveLowerBound::kTrue, InclusiveUpperBound::kTrue, OrderFn, EqualFn > |
class | batt::CountMetric |
class | batt::LatencyMetric |
class | batt::LatencyTimer |
class | batt::RateMetric |
class | batt::GaugeMetric A Metric collector that stores and reports a single instantaneous value. |
class | batt::StatsMetric Collect count, total, max and min values for multiple samples. |
class | batt::HistogramMetric Collect histogram values for multiple samples. |
class | batt::MetricCsvFormatter |
class | batt::MetricDumper |
class | batt::MetricFormatter |
class | batt::MetricOpenTelemetryFormatter Format metrics into OpenTelemetry data format: |
struct | batt::MetricLabel |
class | batt::MetricExporter |
class | batt::ScalarMetricExporter Exports a single value metric. |
class | batt::DerivedMetricExporter |
class | batt::VariableExporter |
class | batt::WatchExporter |
class | batt::QueueDepthExporter |
class | batt::MetricRegistry |
class | batt::PrometheusMetricExporter |
class | batt::NoDestruct |
struct | batt::NoneType |
struct | batt::InPlaceInitType |
class | batt::Optional |
class | batt::Optional< T & > |
struct | batt::NoopDeleter |
class | batt::RadixQueue |
class | batt::Ref |
class | batt::BoxedSeq |
struct | batt::IsBoxedSeq |
struct | batt::IsBoxedSeq< BoxedSeq< T > > |
struct | batt::SeqItem_Impl |
struct | batt::SkipNBinder |
class | batt::SkipN |
class | batt::SubRangeSeq |
struct | batt::VecSeqBase |
class | batt::VecSeq |
class | batt::SeqRef |
struct | batt::SharedPtrImpl |
class | batt::SkipNode |
class | batt::SkipNodeBase |
class | batt::SmallFn A type-erased container for a callable function-like object with a statically bounded maximum size. |
class | batt::kAllowAlloc |
struct | batt::StateMachineModelCheckAdvancedOptions |
class | batt::BasicStateMachineEntropySource |
struct | batt::StateMachineBranch |
class | batt::ExhaustiveModelChecker |
struct | batt::StateMachineResult |
struct | batt::StateMachineTraits |
class | batt::StochasticModelChecker |
class | batt::StateMachineModel |
struct | batt::StaticBinaryAssertion |
struct | batt::StaticSameTypeAssertion |
class | batt::StatusOr |
class | batt::Status |
class | batt::StatusOr< Status > |
class | batt::StatusOr< StatusOr< T > > |
struct | batt::RemoveStatusOrImpl |
struct | batt::RemoveStatusOrImpl< StatusOr< T > > |
struct | batt::EscapedStringLiteral |
struct | batt::HexByteDumper |
struct | batt::SizeDumper Wrapper around usize (std::size_t ) that prints as human-readable sizes. |
class | batt::RangeDumper |
class | batt::StrongType |
struct | batt::IsStrongType |
struct | batt::IsStrongType< StrongType< T, Tag > > |
struct | batt::MorphTuple |
struct | batt::MorphTuple< TemplateT, std::tuple< Ts... > > |
struct | batt::TupleIndexOf |
struct | batt::TupleIndexOf< std::tuple<>, T > |
struct | batt::TupleIndexOf< std::tuple< T, Rest... >, T > |
struct | batt::TupleIndexOf< std::tuple< First, Rest... >, T > |
struct | batt::MapTuple |
struct | batt::MapTuple< PerTypeT, std::tuple< Ts... > > |
class | batt::StaticTypeMap Stores a fixed-size set of Value objects, indexed by a set of bounded types (keys). |
class | batt::AbstractValue |
class | batt::AbstractValuePointer |
class | batt::TypeErasedStorageBase |
class | batt::TypeErasedStorage |
class | batt::AbstractValueImpl |
struct | batt::IsVariant |
struct | batt::IsVariant< std::variant< Ts... > > |
struct | batt::IsTuple |
struct | batt::IsTuple< std::tuple< Ts... > > |
struct | batt::StaticType |
struct | batt::StaticValue |
struct | batt::DecayRValueRefImpl |
struct | batt::Difference Type trait that maps subtractable type T to the difference type. |
struct | batt::Difference< unsigned char > |
struct | batt::Difference< unsigned short > |
struct | batt::Difference< unsigned long > |
struct | batt::Difference< unsigned long long > |
struct | batt::Difference< std::pair< A, B > > |
struct | batt::Difference< std::tuple< Ts... > > |
struct | batt::UrlParse |
struct | batt::DefaultInitialized A single type that implicitly converts to any default-constructible type (via batt::make_default()). |
Types🔗
Name | |
---|---|
enum | StackType { kFixedSize = 0, kProtectedFixedSize = 1, kPooledFixedSize = 2, kMaxValue} |
enum | TransferStep { kNone, kFetch, kWrite} |
enum int | ReadWriteLockQueueNodeClass { kReading = 0, kWriting = 1} |
enum bool | WaitForResource { kFalse = false, kTrue = true} |
enum i8 | BoolStatus { kUnknown = -1, kFalse = 0, kTrue = 1} An enumeration that models boolean (true/false) values plus unknown. |
enum bool | InclusiveLowerBound { kFalse = false, kTrue = true} |
enum bool | InclusiveUpperBound { kFalse = false, kTrue = true} |
enum i8 | Order { Less = -1, Equal = 0, Greater = 1} |
enum int | StatusCode { kOk = 0, kCancelled = 1, kUnknown = 2, kInvalidArgument = 3, kDeadlineExceeded = 4, kNotFound = 5, kAlreadyExists = 6, kPermissionDenied = 7, kResourceExhausted = 8, kFailedPrecondition = 9, kAborted = 10, kOutOfRange = 11, kUnimplemented = 12, kInternal = 13, kUnavailable = 14, kDataLoss = 15, kUnauthenticated = 16, kClosed = 100, kGrantUnavailable = 101, kLoopBreak = 102, kEndOfStream = 103, kClosedBeforeEndOfStream = 104, kGrantRevoked = 105, kPoke = 106} |
enum | ErrnoValue { } |
enum | StdGenericErrorCode { } |
enum | StdFutureErrorCode { } |
enum | StdSystemErrorCode { } |
enum | StdIostreamErrorCode { } |
enum | LogLevel { kFatal, kError, kWarning, kInfo, kDebug, kVerbose} |
enum | Pretty { True, False, Default} |
using ::batt::StrongType< usize, PartsCount_TAG > | PartsCount |
using ::batt::StrongType< usize, PartSize_TAG > | PartSize |
using BasicRunningTotal< usize > | RunningTotal |
template <typename T > using decltype(detail::has_const_buffer_sequence_requirements_impl< T >(nullptr)) |
HasConstBufferSequenceRequirements |
template <typename T > using std::enable_if_t< has_const_buffer_sequence_requirements< T >()> |
EnableIfConstBufferSequence |
template <typename T > using decltype(detail::has_buffer_source_requirements_impl< T >(nullptr)) |
HasBufferSourceRequirements |
template <typename T > using std::enable_if_t< has_buffer_source_requirements< T >()> |
EnableIfBufferSource |
using boost::context::continuation | Continuation |
using ::batt::StrongType< usize, StackSize_TAG > | StackSize |
using BasicFakeExecutor< boost::asio::execution::outstanding_work_t::untracked_t > | FakeExecutor |
using ScalableGrant | Grant |
using boost::intrusive::slist_base_hook< boost::intrusive::cache_last< true >, boost::intrusive::constant_time_size< true > > | DefaultHandlerBase |
template <typename... Args> using BasicAbstractHandler< DefaultHandlerBase, Args... > |
AbstractHandler |
template <typename HandlerFn ,typename... Args> using BasicHandlerImpl< HandlerFn, DefaultHandlerBase, Args... > |
HandlerImpl |
template <typename Base ,typename... Args> using boost::intrusive::slist< BasicAbstractHandler< Base, Args... >, boost::intrusive::cache_last< true >, boost::intrusive::constant_time_size< true > > |
BasicHandlerList |
template <typename... Args> using BasicHandlerList< DefaultHandlerBase, Args... > |
HandlerList |
using boost::system::error_code | ErrorCode |
using BasicMCSMutex< false > | MCSMutex |
using BasicRateLimiter< std::chrono::steady_clock > | RateLimiter |
using BasicReadWriteLock< WatchAtomic > | ReadWriteLock |
template <typename T > using ScopedReadWriteLockImpl< const T, ReadWriteLock::Reader > |
ScopedReadLock |
template <typename T > using ScopedReadWriteLockImpl< T, ReadWriteLock::Writer > |
ScopedWriteLock |
using BasicExecutor< SimpleExecutionContext, boost::asio::execution::outstanding_work_t::untracked_t, boost::asio::execution::blocking_t::never_t, boost::asio::execution::relationship_t::fork_t > | SimpleExecutor |
using ::batt::StrongType< usize, TaskCount_TAG > | TaskCount |
using ::batt::StrongType< usize, InputSize_TAG > | InputSize |
using ::batt::StrongType< usize, TaskSize_TAG > | TaskSize |
using ::batt::StrongType< usize, TaskIndex_TAG > | TaskIndex |
using ::batt::StrongType< isize, TaskOffset_TAG > | TaskOffset |
using boost::asio::const_buffer | ConstBuffer |
using boost::asio::mutable_buffer | MutableBuffer |
using BasicHttpClientConnection< TcpTransport > | HttpClientConnection |
using BasicHttpClientConnection< SslTransport > | HttpsClientConnection |
using ::batt::StrongType< bool, IncludeHttpTrailer_TAG > | IncludeHttpTrailer |
using ::pico_http::MessageHeader | HttpHeader |
using SmallFn< Status(HttpRequest &request, HttpResponse &response)> | HttpRequestDispatcherFn One request dispatcher is created per accepted connection; it is reused in the context of that connection until the connection is closed. |
using SmallFn< StatusOr< HttpRequestDispatcherFn >()> | HttpRequestDispatcherFactoryFn Called once per accepted connection. |
template <typename T > using BasicInterval< IClosedOpen< T > > |
Interval A half-open interval (like STL iterator ranges). |
template <typename T > using BasicInterval< IClosed< T > > |
CInterval A closed interval. |
template <typename T > using std::function< T()> |
DerivedMetric |
using std::vector< MetricLabel > | MetricLabelSet |
template <typename T > using ScalarMetricExporter< CountMetric< T > > |
CountMetricExporter Exports a CountMetric |
template <typename T > using ScalarMetricExporter< GaugeMetric< T > > |
GaugeMetricExporter Exports a GaugeMetric |
template <typename T > using typename detail::NullableImpl< T >::type |
Nullable |
template <typename T > using std::unique_ptr< T, NoopDeleter > |
UniqueNonOwningPtr |
template <typename T > using decltype(detail::has_seq_requirements_impl< T >(nullptr)) |
HasSeqRequirements |
template <typename T > using std::enable_if_t< has_seq_requirements< T >()> |
EnableIfSeq |
template <typename T > using typename SeqItem_Impl< T >::type |
SeqItem |
template <typename T > using boost::intrusive_ref_counter< std::decay_t< T > > |
RefCounted |
template <typename T > using decltype(detail::is_ref_counted_impl< std::decay_t< T > >(nullptr)) |
IsRefCounted |
template <typename T > using typename SharedPtrImpl< T >::type |
SharedPtr |
template <typename T > using boost::iterator_range< T * > |
Slice |
template <typename Signature ,usize kMaxSize =kCpuCacheLineSize - sizeof(void*),bool kAllowAlloc =false> using SmallFn< Signature, kMaxSize, true, kAllowAlloc > |
UniqueSmallFn A type-erased container for a move-only callable function-like object. |
template <typename T ,usize kStaticSize =kDefaultSmallVecSize> using boost::container::small_vector< T, kStaticSize > |
SmallVec |
template <typename T > using boost::container::small_vector_base< T > |
SmallVecBase |
using void(*)(std::ostream &) | PrintToStreamFunctionPointer |
using BasicStateMachineEntropySource< std::function< usize(usize min_value, usize max_value)> > | StateMachineEntropySource |
template <typename T > using detail::IsStatusOrImpl< std::decay_t< T > > |
IsStatusOr |
template <typename T > using typename RemoveStatusOrImpl< std::decay_t< T > >::type |
RemoveStatusOr |
using boost::flyweights::flyweight< std::string, boost::flyweights::no_tracking > | Token |
template <template< typename... > class TemplateT,typename TupleT > using typename MorphTuple< TemplateT, std::decay_t< TupleT > >::type |
MorphTuple_t |
template <template< typename > class PerTypeT,typename TupleT > using typename MapTuple< PerTypeT, std::decay_t< TupleT > >::type |
MapTuple_t |
template <typename Fn ,typename... Args> using decltype(detail::is_callable_impl< Fn, Args... >(nullptr)) |
IsCallable |
template <typename T > using decltype(detail::is_printable_impl< T >(nullptr)) |
IsPrintable |
template <typename T > using decltype(detail::is_range_impl< T >(nullptr)) |
IsRange |
template <typename T ,typename... Args> using std::enable_if_t<!std::is_same< std::tuple< std::decay_t< T > * >, std::tuple< std::decay_t< Args > ... > >{} &&!std::is_same< std::tuple<>, std::tuple< std::decay_t< Args > ... > >{} > |
EnableIfNoShadow |
template <typename T > using typename DecayRValueRefImpl< T >::type |
DecayRValueRef |
template <typename T ,typename U =T> using decltype(detail::can_be_eq_compared_helper< T, U >(nullptr, nullptr)) |
CanBeEqCompared |
template <typename T > using decltype(unwrap_ref(std::declval< T >())) |
UnwrapRefType |
Functions🔗
Name | |
---|---|
template <typename Iter ,typename T ,typename BinaryOp > Slice< T > |
parallel_accumulate_partial(WorkContext & context, Iter first, Iter last, T init, const BinaryOp & binary_op, T identity, const Slice< T > & task_result_buffer, const WorkSliceParams & params) |
template <typename Iter ,typename T ,typename BinaryOp > T |
parallel_accumulate(WorkerPool & worker_pool, Iter first, Iter last, T init, const BinaryOp & binary_op, T identity, TaskSize min_task_size =TaskSize{4096}, TaskCount max_tasks =TaskCount{std::thread::hardware_concurrency()}) |
template <typename Src ,typename Dst > void |
parallel_copy(WorkContext & work_context, Src src_begin, Src src_end, Dst dst_begin, TaskSize min_task_size, TaskCount max_tasks) |
template <typename Src0 ,typename Src1 ,typename Dst ,typename Compare > void |
parallel_merge(WorkerPool & worker_pool, Src0 src_0_begin, Src0 src_0_end, Src1 src_1_begin, Src1 src_1_end, Dst dst_begin, Compare && compare, usize min_task_size =1400, usize max_tasks =std::thread::hardware_concurrency()/2) |
template <typename Src0 ,typename Src1 ,typename Dst ,typename Compare > void |
parallel_merge(WorkContext & context, Src0 src_0_begin, Src0 src_0_end, Src1 src_1_begin, Src1 src_1_end, Dst dst_begin, Compare && compare, usize min_task_size =1400, usize max_tasks =std::thread::hardware_concurrency()/2) |
template <typename Iter ,typename Fn ,typename ValueT =std::decay_t BasicRunningTotal< ValueT > |
parallel_running_total(WorkerPool & worker_pool, Iter first, Iter last, const Fn & fn, const WorkSliceParams & params) |
template <typename Iter ,typename ValueT =typename std::iterator_traits BasicRunningTotal< ValueT > |
parallel_running_total(WorkerPool & worker_pool, Iter first, Iter last, const WorkSliceParams & params) |
template <typename Src ,typename Dst ,typename TransformFn > void |
parallel_transform(WorkContext & work_context, Src src_begin, Src src_end, Dst dst_begin, const TransformFn & transform_fn, TaskSize min_task_size, TaskCount max_tasks) |
constexpr usize | strong_typedef_default_value(PartsCount_TAG * ) |
constexpr usize | strong_typedef_default_value(PartSize_TAG * ) |
void | fail_check_exit() |
std::atomic< bool > & | fail_check_exit_entered() |
std::atomic< bool > & | fail_check_spin_lock() |
template <typename... Ts> bool |
ignore(Ts && ...) |
bool | lock_fail_check_mutex() |
template <typename BodyFn =void(),typename... TaskArgsAndHandler> Task * |
async_run_task(const boost::asio::any_io_executor & ex, StackSize stack_byte_size, BodyFn && body_fn, TaskArgsAndHandler &&... task_args_and_handler) Creates and starts (default) a new batt::Task, the memory for which (including stack) is allocated as a single contiguous memory region using the allocated associated with the final arg passed to this function, the completion handler. |
template <typename RetryPolicy ,typename ActionFn ,typename Result =std::invoke_result_t Result |
with_retry_policy(RetryPolicy && policy, std::string_view action_name, ActionFn && action_fn, SleepImpl && sleep_impl ={}, StatusIsRetryableImpl && status_is_retryable_impl ={}) |
void | update_retry_state(RetryState & state, const ExponentialBackoff & policy) |
template <typename T > constexpr bool |
has_const_buffer_sequence_requirements(StaticType< T > ={}) |
template <typename T > constexpr bool |
has_buffer_source_requirements(StaticType< T > ={}) |
template <typename Src ,typename =EnableIfBufferSource TakeNSource< Src > |
**[operator |
template <typename Src ,typename =EnableIfBufferSource void |
**[operator |
template <typename Src ,typename Fn ,typename =EnableIfBufferSource StatusOr< seq::LoopControl > |
**[operator |
template <typename Src ,typename =EnableIfBufferSource StatusOr< std::vector< char > > |
**[operator |
template <typename Src ,typename =EnableIfBufferSource Status |
**[operator |
template <typename Src ,typename =EnableIfBufferSource Status |
**[operator |
template <typename Src ,typename AsyncWriteStream ,typename =EnableIfBufferSource StatusOr< usize > |
**[operator |
template <typename Src ,typename ConstBufferSequence ,typename =EnableIfBufferSource auto |
**[operator |
usize | hash_value(const CancelToken & cancel_token) CancelToken is hashed by its impl pointer. |
bool | operator==(const CancelToken & l, const CancelToken & r) Returns true iff the two objects are copies of the same CancelToken. |
bool | operator!=(const CancelToken & l, const CancelToken & r) |
bool | operator<(const CancelToken & l, const CancelToken & r) |
bool | operator>(const CancelToken & l, const CancelToken & r) |
bool | operator<=(const CancelToken & l, const CancelToken & r) |
bool | operator>=(const CancelToken & l, const CancelToken & r) |
template <typename T > bool |
is_cancelled(const CancelToken::HandlerImpl< T > & handler) |
template <typename T > bool |
is_cancelled(const CustomAllocHandler< CancelToken::HandlerImpl< T >> & handler) |
BATT_MAYBE_UNUSED ::batt::StaticBinaryAssertion< decltype(sizeof(void ) 2), decltype(sizeof(boost::context::stack_context)),(sizeof(void ) 2), ::batt::Eq,(sizeof(boost::context::stack_context)),((sizeof(void ) 2)==(sizeof(boost::context::stack_context)))> | BOOST_PP_CAT(BOOST_PP_CAT(BATTERIES_StaticAssert_Instance_, LINE) , COUNTER ) |
constexpr usize | strong_typedef_default_value(StackSize_TAG * ) |
template <typename T > const StackAllocator & |
get_stack_allocator_with_type(StackSize stack_size) |
const StackAllocator & | get_stack_allocator(StackSize stack_size, StackType stack_type) |
template <typename Fn > Continuation |
callcc(StackAllocator && stack_allocator, Fn && fn) |
template <typename Fn > Continuation |
callcc(StackSize stack_size, StackType stack_type, Fn && fn) |
void | this_task_debug_info(std::ostream & out) |
void | print_debug_info(DebugInfoFrame * p, std::ostream & out) |
void | print_all_threads_debug_info(std::ostream & out) |
const char * | shortened_source_file(const char * raw) |
bool | enable_dump_tasks() |
template <typename OutstandingWorkP > constexpr bool |
operator==(const BasicFakeExecutor< OutstandingWorkP > & l, const BasicFakeExecutor< OutstandingWorkP > & r) |
template <typename OutstandingWorkP > constexpr bool |
operator!=(const BasicFakeExecutor< OutstandingWorkP > & l, const BasicFakeExecutor< OutstandingWorkP > & r) |
bool | operator<(const FakeTimeService::TimerInstance & l, const FakeTimeService::TimerInstance & r) |
bool | operator>(const FakeTimeService::TimerInstance & l, const FakeTimeService::TimerInstance & r) |
bool | operator<=(const FakeTimeService::TimerInstance & l, const FakeTimeService::TimerInstance & r) |
bool | operator>=(const FakeTimeService::TimerInstance & l, const FakeTimeService::TimerInstance & r) |
template <typename AsyncFetchStreamT ,typename ScopedChunk =BasicScopedChunk batt::StatusOr< ScopedChunk > |
fetch_chunk(AsyncFetchStreamT & stream, usize min_size) Awaits the result of an async_fetch on the passed stream with the given minimum chunk size. |
template <typename From ,typename To > StatusOr< usize > |
transfer_chunked_data(From & from, To & to, TransferStep & step) |
template <typename From ,typename To > StatusOr< usize > |
transfer_chunked_data(From & from, To & to) Fetches data from the first arg and writes it to the second arg, until an error or end-of-file/stream occurs. |
int | futex_wait(std::atomic< u32 > * , u32 ) |
int | futex_notify(std::atomic< u32 > * , u32 =1) |
void | spin_yield() |
template <typename T > Future< T > |
get_future(const Promise< T > & promise) Returns the Future object corresponding to the Promise. |
BATT_MAYBE_UNUSED ::batt::StaticBinaryAssertion< decltype(sizeof(UniqueHandler<>)), decltype(sizeof(void )),(sizeof(UniqueHandler<>)), ::batt::Eq,(sizeof(void )),((sizeof(UniqueHandler<>))==(sizeof(void *)))> | BOOST_PP_CAT(BOOST_PP_CAT(BATTERIES_StaticAssert_Instance_, LINE) , COUNTER ) |
template <typename Base ,typename... Args> void |
push_handler_prealloc(boost::intrusive::slist< BasicAbstractHandler< Base, Args... >, boost::intrusive::cache_last< true >, boost::intrusive::constant_time_size< true >> * list, BasicAbstractHandler< Base, Args... > * handler) |
template <typename... Args,typename Base ,typename HandlerFn > void |
push_handler(boost::intrusive::slist< BasicAbstractHandler< Base, Args... >, boost::intrusive::cache_last< true >, boost::intrusive::constant_time_size< true >> * list, HandlerFn && fn) |
template <typename... Params,typename... Args,typename Base > void |
invoke_all_handlers(boost::intrusive::slist< BasicAbstractHandler< Base, Params... >, boost::intrusive::cache_last< true >, boost::intrusive::constant_time_size< true >> * handlers, Args &&... args) |
template <typename InnerFn ,typename OuterFn > HandlerBinder< std::decay_t< InnerFn >, std::decay_t< OuterFn > > |
bind_handler(InnerFn && inner, OuterFn && outer) |
template <typename T ,typename U > bool |
operator==(const HandlerAllocator< T > & left, const HandlerAllocator< U > & right) |
template <typename T ,typename U > bool |
operator!=(const HandlerAllocator< T > & left, const HandlerAllocator< U > & right) |
template <typename Handler > CustomAllocHandler< std::decay_t< Handler > > |
make_custom_alloc_handler(HandlerMemoryBase & m, Handler && h) Helper function to wrap a handler object to add custom allocation. |
template <typename Handler ,typename... Args> void |
post_handler(Handler && handler, Args &&... args) Posts a handler using its associated executor, binding its arguments. |
template <typename... Ts> std::ostream & |
operator<<(std::ostream & out, const IOResult< Ts... > & t) |
template <typename... Ts> bool |
is_ok_status(const IOResult< Ts... > & io_result) |
bool | is_ok_status(const ErrorCode & ec) |
template <typename... Ts> Status |
to_status(const IOResult< Ts... > & io_result) |
template <typename T > void |
pin_object(T * object) |
template <typename T > void |
unpin_object(T * object) |
template <typename T > Pin< T > |
make_pin(T * object) |
template <typename T ,typename U > bool |
operator==(const Pin< T > & l, const Pin< U > & r) |
template <typename T ,typename U > bool |
operator!=(const Pin< T > & l, const Pin< U > & r) |
template <typename T > bool |
operator==(const Pin< T > & l, std::nullptr_t ) |
template <typename T > bool |
operator!=(const Pin< T > & l, std::nullptr_t ) |
template <typename U > bool |
operator==(std::nullptr_t , const Pin< U > & r) |
template <typename U > bool |
operator!=(std::nullptr_t , const Pin< U > & r) |
std::ostream & | operator<<(std::ostream & out, const DumpReadWriteLockState & dump) |
std::ostream & | operator<<(std::ostream & out, ReadWriteLockQueueNodeClass t) |
std::ostream & | operator<<(std::ostream & out, const ScalableGrant & t) |
constexpr usize | strong_typedef_default_value(TaskCount_TAG * ) |
constexpr usize | strong_typedef_default_value(InputSize_TAG * ) |
constexpr usize | strong_typedef_default_value(TaskSize_TAG * ) |
constexpr usize | strong_typedef_default_value(TaskIndex_TAG * ) |
constexpr isize | strong_typedef_default_value(TaskOffset_TAG * ) |
template <typename Iter > InputSize |
get_input_size(const Iter & first, const Iter & last) |
std::ostream & | operator<<(std::ostream & out, const WorkSliceParams & t) |
TaskSize | get_task_size(const WorkSliceParams & params, InputSize input_size) |
TaskCount | get_task_count(InputSize input_size, TaskSize task_size) |
std::ostream & | operator<<(std::ostream & out, const WorkSlicePlan & t) |
template <typename WorkFnGenerator > Status |
slice_work(WorkContext & context, const WorkSlicePlan & plan, WorkFnGenerator && gen_work_fn) |
std::ostream & | operator<<(std::ostream & out, const SpinGrant & t) |
template <typename T > StatusOr< std::reference_wrapper< StreamBuffer > > |
operator<<(StatusOr< std::reference_wrapper< StreamBuffer >> stream_buffer, T && obj) |
i32 | next_thread_id() Returns the lowest unused global thread id number; repeated calls to next_thread_id() will return monotonically increasing values. |
i32 & | this_thread_id() Returns a reference to the thread-local id for the current thread. |
std::ostream & | operator<<(std::ostream & out, WaitForResource t) |
template <typename T > std::ostream & |
operator<<(std::ostream & out, const Watch< T > & w) Support for printing Watch |
template <typename T > std::ostream & |
operator<<(std::ostream & out, const WatchAtomic< T > & w) Support for printing WatchAtomic |
constexpr BoolStatus | bool_status_from(bool b) Constructs a BoolStatus value from a bool. |
constexpr BoolStatus | **[operator |
constexpr BoolStatus | operator&&(BoolStatus left, BoolStatus right) Performs a logical-and (conjunction) between two BoolStatus values. |
constexpr BoolStatus | operator!(BoolStatus b) Performs a logical-not (negation) for the given BoolStatus value. |
std::ostream & | operator<<(std::ostream & out, const BoolStatus & t) Prints a BoolStatus value. |
i8 | least_upper_bound(i8 n) |
i8 | greatest_lower_bound(i8 n) |
i16 | least_upper_bound(i16 n) |
i16 | greatest_lower_bound(i16 n) |
i32 | least_upper_bound(i32 n) |
i32 | greatest_lower_bound(i32 n) |
i64 | least_upper_bound(i64 n) |
i64 | greatest_lower_bound(i64 n) |
u8 | least_upper_bound(u8 n) |
u8 | greatest_lower_bound(u8 n) |
u16 | least_upper_bound(u16 n) |
u16 | greatest_lower_bound(u16 n) |
u32 | least_upper_bound(u32 n) |
u32 | greatest_lower_bound(u32 n) |
u64 | least_upper_bound(u64 n) |
u64 | greatest_lower_bound(u64 n) |
template <typename T > LeastUpperBound< std::decay_t< T > > |
least_upper_bound(T && value) |
template <typename T ,typename U > bool |
operator<(const T & left, const LeastUpperBound< U > & right) |
template <typename T ,typename U > bool |
operator<(const LeastUpperBound< T > & left, const U & right) |
template <typename T ,typename U > bool |
operator<(const LeastUpperBound< T > & left, const LeastUpperBound< U > & right) |
template <typename T ,typename U > bool |
operator==(const T & , const LeastUpperBound< U > & ) |
template <typename T ,typename U > bool |
operator==(const LeastUpperBound< T > & , const U & ) |
template <typename T ,typename U > bool |
operator==(const LeastUpperBound< T > & left, const LeastUpperBound< U > & right) |
template <typename T ,typename U > bool |
operator>(const T & l, const LeastUpperBound< U > & r) |
template <typename T ,typename U > bool |
operator<=(const T & l, const LeastUpperBound< U > & r) |
template <typename T ,typename U > bool |
operator>=(const T & l, const LeastUpperBound< U > & r) |
template <typename T ,typename U > bool |
operator>(const LeastUpperBound< T > & l, const U & r) |
template <typename T ,typename U > bool |
operator<=(const LeastUpperBound< T > & l, const U & r) |
template <typename T ,typename U > bool |
operator>=(const LeastUpperBound< T > & l, const U & r) |
template <typename T ,typename U > bool |
operator>(const LeastUpperBound< T > & l, const LeastUpperBound< U > & r) |
template <typename T ,typename U > bool |
operator<=(const LeastUpperBound< T > & l, const LeastUpperBound< U > & r) |
template <typename T ,typename U > bool |
operator>=(const LeastUpperBound< T > & l, const LeastUpperBound< U > & r) |
template <typename T ,typename U > bool |
operator!=(const T & l, const LeastUpperBound< U > & r) |
template <typename T ,typename U > bool |
operator!=(const LeastUpperBound< T > & l, const U & r) |
template <typename T ,typename U > bool |
operator!=(const LeastUpperBound< T > & l, const LeastUpperBound< U > & r) |
template <typename T ,typename U > GreatestLowerBound< std::decay_t< T > > |
greatest_lower_bound(T && value) |
template <typename T ,typename U > bool |
operator<(const T & left, const GreatestLowerBound< U > & right) |
template <typename T ,typename U > bool |
operator<(const GreatestLowerBound< T > & left, const U & right) |
template <typename T ,typename U > bool |
operator<(const GreatestLowerBound< T > & left, const GreatestLowerBound< U > & right) |
template <typename T ,typename U > bool |
operator==(const T & , const GreatestLowerBound< U > & ) |
template <typename T ,typename U > bool |
operator==(const GreatestLowerBound< T > & , const U & ) |
template <typename T ,typename U > bool |
operator==(const GreatestLowerBound< T > & left, const GreatestLowerBound< U > & right) |
template <typename T ,typename U > bool |
operator>(const T & l, const GreatestLowerBound< U > & r) |
template <typename T ,typename U > bool |
operator<=(const T & l, const GreatestLowerBound< U > & r) |
template <typename T ,typename U > bool |
operator>=(const T & l, const GreatestLowerBound< U > & r) |
template <typename T ,typename U > bool |
operator>(const GreatestLowerBound< T > & l, const U & r) |
template <typename T ,typename U > bool |
operator<=(const GreatestLowerBound< T > & l, const U & r) |
template <typename T ,typename U > bool |
operator>=(const GreatestLowerBound< T > & l, const U & r) |
template <typename T ,typename U > bool |
operator>(const GreatestLowerBound< T > & l, const GreatestLowerBound< U > & r) |
template <typename T ,typename U > bool |
operator<=(const GreatestLowerBound< T > & l, const GreatestLowerBound< U > & r) |
template <typename T ,typename U > bool |
operator>=(const GreatestLowerBound< T > & l, const GreatestLowerBound< U > & r) |
template <typename T ,typename U > bool |
operator!=(const T & l, const GreatestLowerBound< U > & r) |
template <typename T ,typename U > bool |
operator!=(const GreatestLowerBound< T > & l, const U & r) |
template <typename T ,typename U > bool |
operator!=(const GreatestLowerBound< T > & l, const GreatestLowerBound< U > & r) |
template <typename... Args> decltype(auto) |
make_buffer(Args &&... args) |
template <typename T > ConstBuffer |
buffer_from_struct(const T & val) |
std::string_view | as_str(const ConstBuffer & buffer) Converts a ConstBuffer into an equivalent std::string_view. |
template <typename T > std::string_view |
bytes_from_struct(const T & val) Returns a std::string_view with the same size and data address as the passed object, as if the address of val had been reinterpret_cast to type const char* . |
template <typename T > MutableBuffer |
mutable_buffer_from_struct(T & val) |
ConstBuffer | resize_buffer(const ConstBuffer & b, usize s) |
MutableBuffer | resize_buffer(const MutableBuffer & b, usize s) |
template <typename SizeT > ConstBuffer |
slice_buffer(const ConstBuffer & b, const Interval< SizeT > & slice) Select a subset of the passed buffer according to the passed interval. |
template <typename SizeT > MutableBuffer |
slice_buffer(const MutableBuffer & b, const Interval< SizeT > & slice) Select a subset of the passed buffer according to the passed interval. |
template <typename VecT > void |
consume_buffers(VecT & buffers, usize count) |
template <typename Iter > std::pair< Iter, usize > |
consume_buffers_iter(const std::pair< Iter, usize > & pos, const Iter & last, usize count) |
template <typename VecT > VecT |
consume_buffers_copy(const VecT & buffers, usize count) |
template <usize kLength,usize... kIndex> constexpr std::array< char, kLength - 1 > |
array_from_c_str(const char(&) c_str[kLength], std::index_sequence< kIndex... > ) Converts a compile-time string constant to std::array |
template <usize kLength> constexpr std::array< char, kLength - 1 > |
array_from_c_str(const char(&) c_str[kLength]) Converts a compile-time string constant to std::array |
ConstBuffer | as_const_buffer(const ConstBuffer & buffer) |
ConstBuffer | as_const_buffer(const MutableBuffer & buffer) |
ConstBuffer | as_const_buffer(const std::string_view & str) |
ConstBuffer | as_const_buffer(const std::string & str) |
template <usize kSize> ConstBuffer |
as_const_buffer(const std::array< char, kSize > & arr) |
template <usize kSize> ConstBuffer |
as_const_buffer(const std::array< u8, kSize > & arr) |
ConstBuffer | as_const_buffer(const std::vector< char > & vec) |
ConstBuffer | as_const_buffer(const std::vector< u8 > & vec) |
ConstBuffer | as_const_buffer(const SmallVecBase< char > & vec) |
ConstBuffer | as_const_buffer(const SmallVecBase< u8 > & vec) |
template <usize kLength> ConstBuffer |
as_const_buffer(const char(&) c_str[kLength]) |
template <typename... Cases> CaseOfVisitor< Cases &&... > |
make_case_of_visitor(Cases &&... cases) Constructs and returns a single overloaded callable function object that forwards its arguments on to the first object in cases that is callable with those arguments. |
template <typename VarType ,typename... Cases> decltype(auto) |
case_of(VarType && v, Cases &&... cases) Matches a variant against a list of callables and apply the first one that will accept the current value. |
template <typename T ,typename Var > bool |
is_case(Var && v) |
template <typename ToType ,typename FromType ,typename =std::enable_if_t ToType |
checked_cast(FromType val, const char * file ="", int line =0) |
template <typename ToType ,typename FromType ,typename =std::enable_if_t ToType |
checked_cast(FromType val, const char * file ="", int line =0) |
template <typename ToType ,typename FromType ,typename =std::enable_if_t<!std::is_signed_v ToType |
checked_cast(FromType val, const char * file ="", int line =0) |
std::ostream & | operator<<(std::ostream & out, Order t) |
Order | compare(const std::string_view & a, const std::string_view & b) |
template <typename T > std::ostream & |
operator<<(std::ostream & out, const CpuCacheLineIsolated< T > & t) |
Status | pin_thread_to_cpu(usize cpu_i) |
template <typename IntRange > Status |
pin_thread_to_cpu_set(const IntRange & cpu_i_set) |
Status | pin_thread_i_of_config(usize i, const ThreadPoolConfig & config, const std::string_view & pool_name ="") |
template <typename... Args> constexpr void |
do_nothing(Args && ...) |
bool | big_endian_less_than(BOOST_PP_CAT(u, 16) a, BOOST_PP_CAT(u, 16) b) |
bool | big_endian_less_than(BOOST_PP_CAT(u, 32) a, BOOST_PP_CAT(u, 32) b) |
bool | big_endian_less_than(BOOST_PP_CAT(u, 64) a, BOOST_PP_CAT(u, 64) b) |
template <typename T > Optional< T > |
getenv_as(const char * var_name) Parse environment variable as a given type T . |
template <typename Fn > auto |
finally(Fn && fn) |
usize | hash() |
template <typename T > usize |
hash(T && obj) |
template <typename T ,typename HashT =typename std::decay_t usize |
hash_value(T && obj) |
template <typename First ,typename... Rest> usize |
hash(First && first, Rest &&... rest) |
StatusOr< SmallVec< boost::asio::ip::tcp::endpoint > > | await_resolve(boost::asio::ip::tcp::resolver & resolver, const HostAddress & host_address) |
StatusOr< SmallVec< boost::asio::ip::tcp::endpoint > > | await_resolve(boost::asio::io_context & io, const HostAddress & host_address) |
usize | hash_value(const HostAddress & host_key) |
bool | operator==(const HostAddress & l, const HostAddress & r) |
bool | operator!=(const HostAddress & l, const HostAddress & r) |
std::ostream & | operator<<(std::ostream & out, const HostAddress & t) |
template <typename Src ,typename AsyncWriteStream > Status |
http_encode_chunked(Src && src, AsyncWriteStream && dst, IncludeHttpTrailer include_trailer =IncludeHttpTrailer{false}) |
template <typename... Params> StatusOr< std::unique_ptr< HttpResponse > > |
http_request(std::string_view method, std::string_view url, Params &&... params) Submits an HTTP request, returning the response object. |
template <typename... Params> StatusOr< std::unique_ptr< HttpResponse > > |
http_get(std::string_view url, Params &&... params) |
template <typename... Params> StatusOr< std::unique_ptr< HttpResponse > > |
http_post(std::string_view url, Params &&... params) |
template <typename... Params> StatusOr< std::unique_ptr< HttpResponse > > |
http_put(std::string_view url, Params &&... params) |
template <typename... Params> StatusOr< std::unique_ptr< HttpResponse > > |
http_delete(std::string_view url, Params &&... params) |
constexpr bool | strong_typedef_default_value(IncludeHttpTrailer_TAG * ) |
Optional< std::string_view > | find_header(const SmallVecBase< HttpHeader > & headers, const std::string_view & name) |
std::ostream & | operator<<(std::ostream & out, const HttpMessageInfo & t) |
template <typename TraitsT ,typename DeltaT > BasicInterval< TraitsT > |
push_back(const BasicInterval< TraitsT > & i, DeltaT delta) |
template <typename TraitsT ,typename DeltaT > BasicInterval< TraitsT > |
push_front(const BasicInterval< TraitsT > & i, DeltaT delta) |
template <typename TraitsT ,typename DeltaT > BasicInterval< TraitsT > |
pop_back(const BasicInterval< TraitsT > & i, DeltaT delta) |
template <typename TraitsT ,typename DeltaT > BasicInterval< TraitsT > |
pop_front(const BasicInterval< TraitsT > & i, DeltaT delta) |
template <typename T ,typename U > BasicInterval< IClosedOpen< std::decay_t< T >, std::decay_t< U > > > |
make_interval(T && lower, U && upper) |
template <typename TraitsL ,typename TraitsR > bool |
operator==(const BasicInterval< TraitsL > & l, const BasicInterval< TraitsR > & r) |
template <typename TraitsL ,typename TraitsR > bool |
operator!=(const BasicInterval< TraitsL > & l, const BasicInterval< TraitsR > & r) |
template <typename Traits > std::ostream & |
operator<<(std::ostream & out, const BasicInterval< Traits > & t) |
template <typename Traits0 ,typename Traits1 > constexpr bool |
interval_traits_compatible() |
template <typename T ,typename =std::enable_if_t decltype(auto) |
make_printable(T && obj) Returns a std::ostream-printable representation of the argument, obj . |
template <typename T ,typename =std::enable_if_t<!IsPrintable std::string |
make_printable(T && obj) Returns a std::ostream-printable representation of the argument, obj . |
constexpr i32 | log2_ceil(u64 i) Returns log_2(i), rounded down to the nearest integer. |
constexpr i32 | log2_floor(u64 i) Returns log_2(i), rounded down to the nearest integer. |
template <typename IntT > constexpr IntT |
lsb_mask(i32 bits) Least Significant Bits Mask. |
template <typename IntT > constexpr IntT |
round_down_bits(i32 bits, IntT n) Rounds an integer value down to the nearest multiple of 2^bits. |
template <typename IntT > constexpr IntT |
round_up_bits(i32 bits, IntT n) Rounds an integer value up to the nearest multiple of 2^bits. |
template <typename IntT > constexpr IntT |
round_down_to(IntT unit, IntT n) Rounds n down to the nearest multiple of unit . |
template <typename IntT > constexpr IntT |
round_up_to(IntT unit, IntT n) Rounds n up to the nearest multiple of unit . |
template <typename IntT > constexpr IntT |
ipow(IntT base, IntT exponent, IntT accumulator =static_cast< IntT >(1)) Compile-time integer exponentiation. |
i32 | bit_count(u64 n) Returns the number of set (1) bits in the passed integer. |
std::ostream & | operator<<(std::ostream & out, const LatencyMetric & t) |
MetricLabelSet | normalize_labels(MetricLabelSet && labels) |
MetricRegistry & | global_metric_registry() |
template <typename T > auto |
make_nullable(T && obj) |
bool | operator==(const NoneType & , const NoneType & ) |
bool | operator!=(const NoneType & , const NoneType & ) |
template <typename T0 ,typename T1 > bool |
operator==(const Optional< T0 > & v0, const Optional< T1 > & v1) |
template <typename T0 ,typename T1 > bool |
operator!=(const Optional< T0 > & v0, const Optional< T1 > & v1) |
template <typename T0 ,typename T1 > bool |
operator==(const Optional< T0 > & v0, const T1 & v1) |
template <typename T0 ,typename T1 > bool |
operator!=(const Optional< T0 > & v0, const T1 & v1) |
template <typename T0 ,typename T1 > bool |
operator==(const T0 & v0, const Optional< T1 > & v1) |
template <typename T0 ,typename T1 > bool |
operator!=(const T0 & v0, const Optional< T1 > & v1) |
template <typename T > bool |
operator==(NoneType , const Optional< T > & v) |
template <typename T > bool |
operator!=(NoneType , const Optional< T > & v) |
template <typename T > bool |
operator==(const Optional< T > & v, NoneType ) |
template <typename T > bool |
operator!=(const Optional< T > & v, NoneType ) |
template <typename T > std::ostream & |
operator<<(std::ostream & out, const Optional< T > & t) |
std::ostream & | operator<<(std::ostream & out, const NoneType & ) |
template <typename T > Optional< std::decay_t< T > > |
make_optional(T && val) |
template <typename T > decltype(auto) |
get_or_panic(Optional< T > & opt) |
template <typename T > decltype(auto) |
get_or_panic(const Optional< T > & opt) |
template <typename T > decltype(auto) |
get_or_panic(Optional< T > && opt) |
template <usize N_> std::ostream & |
operator<<(std::ostream & out, const RadixQueue< N_ > & t) |
template <typename T > std::ostream & |
operator<<(std::ostream & out, const Ref< T > & t) |
template <typename T > Ref< T > |
as_ref(T & obj_ref) |
template <typename T > Ref< const T > |
as_cref(const T & obj_ref) |
template <typename T > Ref< T > |
into_ref(T * ptr) |
template <typename T > Ref< const T > |
into_cref(const T * ptr) |
template <typename T > decltype(auto) |
unwrap_ref(Ref< T > & wrapper) |
template <typename T > decltype(auto) |
unwrap_ref(Ref< T > const & wrapper) |
template <typename T > decltype(auto) |
unwrap_ref(Ref< T > && wrapper) |
template <typename T > decltype(auto) |
unwrap_ref(Ref< T > const && wrapper) |
bool & | print_stack_trace_atexit_enabled() |
void | print_stack_trace_atexit() |
template <typename T > constexpr bool |
has_seq_requirements(StaticType< T > ={}) |
SkipNBinder | skip_n(usize n) |
template <typename Seq ,typename =EnableIfSeq SkipN< Seq > |
**[operator |
template <typename T ,typename =decltype(std::declval SubRangeSeq< T > |
as_seq(T && sub_range) |
template <typename ForwardIter > auto |
as_seq(ForwardIter && begin, ForwardIter && end) |
template <typename VectorLike ,typename =decltype(std::declval auto |
as_seq(VectorLike && v) |
template <typename T ,typename Begin =decltype(std::declval auto |
vec_range(const T & vec) |
template <typename T > auto |
into_seq(std::vector< T > && v) |
template <typename SeqT > SeqRef< SeqT > |
seq_ref(SeqT & seq) |
template <typename T ,typename... Args,typename =std::enable_if_t SharedPtr< T > |
make_shared(Args &&... args) |
template <typename T ,typename... Args,typename =std::enable_if_t<!IsRefCounted SharedPtr< T > |
make_shared(Args &&... args) |
template <typename T > SharedPtr< T > |
into_shared(std::unique_ptr< T > && ptr) |
template <typename T ,typename =std::enable_if_t< std::is_same_v SharedPtr< T > |
shared_ptr_from(T * that) |
template <typename T ,typename =std::enable_if_t< std::is_same_v SharedPtr< T > |
shared_ptr_from(T * that) |
template <typename T ,typename DataT =decltype(std::declval Slice< ElementT > |
as_slice(T && container) |
template <typename ElementT > Slice< ElementT > |
as_slice(ElementT * begin, ElementT * end) |
template <typename ElementT > Slice< ElementT > |
as_slice(ElementT * begin, usize size) |
template <typename ElementT > Slice< ElementT > |
as_slice(const Slice< ElementT > & slice) |
template <typename ElementT > Slice< const ElementT > |
as_const_slice(const ElementT * begin, const ElementT * end) |
template <typename ElementT > Slice< const ElementT > |
as_const_slice(const ElementT * begin, usize size) |
template <typename T ,typename DataT =decltype(std::declval Slice< const ElementT > |
as_const_slice(const T & container) |
template <typename ElementT > Slice< ElementT > |
empty_slice(StaticType< ElementT > ={}) |
template <typename T > SubRangeSeq< Slice< T > > |
as_seq(const Slice< T > & s) |
template <typename T > auto |
as_seq(Slice< T > & s) |
template <typename T > auto |
as_seq(Slice< T > && s) |
template <typename T > auto |
as_seq(const Slice< T > && s) |
template <typename Iter > boost::iterator_range< Iter > |
as_range(const std::pair< Iter, Iter > & p) |
template <typename RangeT ,typename Iter =std::decay_t boost::iterator_range< Iter > |
slice_range(RangeT && range, const Interval< OffsetT > & i) |
void | copy_string(SmallVecBase< char > & dst, const std::string_view & src) |
std::string_view | as_str(const SmallVecBase< char > & v) |
std::atomic< PrintToStreamFunctionPointer > & | extra_segv_debug_info_callback() |
void | print_stack_trace() |
template <typename StateT ,typename StateHash ,typename StateEqual > std::ostream & |
operator<<(std::ostream & out, const StateMachineBranch< StateT, StateHash, StateEqual > & t) |
template <typename StateT ,typename StateHash ,typename StateEqual > bool |
operator==(const StateMachineBranch< StateT, StateHash, StateEqual > & l, const StateMachineBranch< StateT, StateHash, StateEqual > & r) |
template <typename StateT ,typename StateHash ,typename StateEqual > usize |
hash_value(const StateMachineBranch< StateT, StateHash, StateEqual > & branch) |
StateMachineResult | combine_results(const StateMachineResult & a, const StateMachineResult & b) |
std::ostream & | operator<<(std::ostream & out, const StateMachineResult & r) |
template <typename IntT ,IntT kBegin,IntT kEnd,typename Fn ,typename R =decltype(std::declval R |
static_dispatch(IntT i, Fn && fn) |
template <typename Fn > decltype(auto) |
static_dispatch(bool b, Fn && fn) |
template <typename Tuple ,typename Fn > decltype(auto) |
static_dispatch(std::size_t i, Fn && fn) |
std::ostream & | operator<<(std::ostream & out, const Status & t) |
bool | operator==(const Status & l, const Status & r) |
bool | operator!=(const Status & l, const Status & r) |
Status | OkStatus() |
template <typename T ,typename U ,typename =std::enable_if_t bool |
operator==(const StatusOr< T > & l, const StatusOr< U > & r) |
template <typename T ,typename U ,typename =std::enable_if_t<!CanBeEqCompared bool |
operator==(const StatusOr< T > & l, const StatusOr< U > & r) |
template <typename T ,typename U > bool |
operator!=(const StatusOr< T > & l, const StatusOr< U > & r) |
bool | is_ok_status(const std::error_code & ec) |
template <typename T > bool |
is_ok_status(const T & val) |
std::ostream & | operator<<(std::ostream & out, LogLevel t) |
std::atomic< LogLevel > & | require_fail_global_default_log_level() |
Optional< LogLevel > & | require_fail_thread_default_log_level() |
Status | status_from_errno(int code) |
template <typename T ,typename =std::enable_if_t decltype(auto) |
to_status(T && v) |
template <typename T ,typename =std::enable_if_t<std::is_same_v |
|
template <typename EnumT > bool |
register_error_category(const boost::system::error_category & category, const std::vector< EnumT > & codes, batt::StaticType< EnumT > ={}) Registers a custom error_category so that error_code objects that use it can be converted to batt::Status via batt::to_status. |
Status | status_from_error_category(const boost::system::error_category & category, int code) Constructs and returns a batt::Status equivalent to the given code in the given category. |
Status | status_from_error_code(const boost::system::error_code & ec) Constructs and returns a batt::Status equivalent to the given error_code. |
Status | error_code_to_status(const std::error_code & ec) |
Status | error_code_to_status(const boost::system::error_code & ec) |
template <typename T ,typename =std::enable_if_t<std::is_same_v |
|
template <typename T ,typename =std::enable_if_t<std::is_same_v |
|
template <typename T > Status |
status_from_retval(T retval) |
template <typename T > T && |
ok_result_or_panic(StatusOr< T > && result) |
template <typename T ,typename =std::enable_if_t std::ostream & |
operator<<(std::ostream & out, T && status_or) |
bool | status_is_retryable(const Status & s) |
std::ostream & | print_all(std::ostream & out) |
template <typename First ,typename... Rest> std::ostream & |
print_all(std::ostream & out, First && first, Rest &&... rest) |
std::istream & | extract_all(std::istream & in) |
template <typename First ,typename... Rest> std::istream & |
extract_all(std::istream & in, First && first, Rest &&... rest) |
template <typename... Args> std::string |
to_string(Args &&... args) |
template <typename T ,typename... FormatArgs> std::optional< T > |
from_string(const std::string & str, FormatArgs &&... format_args) |
EscapedStringLiteral | c_str_literal(const std::string_view & str) |
template <typename T ,typename =std::enable_if_t Optional< EscapedStringLiteral > |
c_str_literal(const Optional< T > & maybe_str) |
Optional< EscapedStringLiteral > | c_str_literal(const NoneType & ) |
decltype(auto) | make_printable(std::string & str) |
decltype(auto) | make_printable(std::string && str) |
decltype(auto) | make_printable(const std::string & str) |
decltype(auto) | make_printable(const std::string && str) |
decltype(auto) | make_printable(std::string_view & str) |
decltype(auto) | make_printable(std::string_view && str) |
decltype(auto) | make_printable(const std::string_view & str) |
decltype(auto) | make_printable(const std::string_view && str) |
const std::string_view & | StringUpperBound() |
std::ostream & | operator<<(std::ostream & out, const EscapedStringLiteral & t) |
std::ostream & | operator<<(std::ostream & out, const HexByteDumper & t) |
HexByteDumper | dump_hex(const void * ptr, usize size) |
std::ostream & | operator<<(std::ostream & out, SizeDumper t) |
SizeDumper | dump_size(usize n) |
SizeDumper | dump_size_exact(usize n) |
Optional< usize > | parse_byte_size(std::string_view s) Parse a byte size string with optional units. |
template <typename T > RangeDumper< const T & > |
dump_range(const T & value, Pretty pretty =Pretty::Default) |
auto | pretty_print_indent() |
template <typename T > constexpr bool |
is_strong_type(StaticType< T > ={}) |
template <typename T ,typename Tag ,typename =std::enable_if_t constexpr StrongType< T, Tag > |
operator+(StrongType< T, Tag > a, StrongType< T, Tag > b) |
template <typename T ,typename Tag ,typename =std::enable_if_t constexpr StrongType< T, Tag > |
operator-(StrongType< T, Tag > a, StrongType< T, Tag > b) |
template <typename T ,typename Tag ,typename =std::enable_if_t constexpr StrongType< T, Tag > |
operator*(StrongType< T, Tag > a, StrongType< T, Tag > b) |
template <typename T ,typename Tag ,typename =std::enable_if_t constexpr StrongType< T, Tag > |
operator/(StrongType< T, Tag > a, StrongType< T, Tag > b) |
template <typename Op > auto |
syscall_retry(Op && op) |
template <typename L ,typename R > constexpr bool |
operator==(StaticType< L > , StaticType< R > ) |
template <typename L ,typename R > constexpr bool |
operator!=(StaticType< L > , StaticType< R > ) |
constexpr bool | is_any_true() Returns true iff any of the passed arguments evaluates to true (base case; always returns false). |
template <typename... Rest> constexpr bool |
is_any_true(bool first, Rest &&... rest) Returns true iff any of the passed arguments evaluates to true (recursive case; short circuits if first is true.). |
constexpr bool | are_all_true() Returns true iff all of the passed arguments evaluate to true (base case; always returns false). |
template <typename... Rest> constexpr bool |
are_all_true(bool first, Rest &&... rest) Returns true iff any of the passed arguments evaluates to true (recursive case; short circuits if first is true.). |
const char * | name_of(const std::type_index & index) Calculates and returns the demangled name of the given type as a null-terminated C-string. |
const char * | name_of(const std::type_info & info) Calculates and returns the demangled name of the given type as a null-terminated C-string. |
template <typename T > const char * |
name_of(batt::StaticType< T > ={}) Calculates and returns the demangled name of the given type as a null-terminated C-string. |
template <typename T > const char * |
unqualified_name_of(batt::StaticType< T > ={}) Calculates and returns the demangled name of the given type, without the namespace qualifier. |
template <typename T ,typename =std::enable_if_t constexpr auto |
can_be_empty_base(StaticType< T > ={}) Returns true iff the specified type can be optimized to zero size via empty base class optimization. |
template <typename T ,typename =std::enable_if_t<!std::is_class_v constexpr std::false_type |
can_be_empty_base(StaticType< T > ={}) |
bool | operator==(const UrlParse & left, const UrlParse & right) |
bool | operator!=(const UrlParse & left, const UrlParse & right) |
std::ostream & | operator<<(std::ostream & out, const UrlParse & t) |
StatusOr< UrlParse > | parse_url(std::string_view url) |
template <typename T > T |
make_copy(const T & value) Return a copy of value . |
template <typename T ,typename =std::enable_if_t T && |
sink(T && value) |
template <typename T > T |
sink(const T & value) |
template <typename T ,typename =std::enable_if_t<!std::is_same_v T |
make_default() Return a default-constructed instance of type T . |
template <typename T ,typename =std::enable_if_t void |
make_default() |
template <typename T > decltype(auto) |
unwrap_ref(T && obj) |
template <typename T > decltype(auto) |
unwrap_ref(std::reference_wrapper< T > & wrapper) |
template <typename T > decltype(auto) |
unwrap_ref(std::reference_wrapper< T > const & wrapper) |
template <typename T > decltype(auto) |
unwrap_ref(std::reference_wrapper< T > && wrapper) |
template <typename T > decltype(auto) |
unwrap_ref(std::reference_wrapper< T > const && wrapper) |
template <typename Fn ,typename... Args> decltype(auto) |
rotate_args_right(Fn && fn, Args &&... args) |
template <typename Fn ,typename... Args> decltype(auto) |
rotate_args_left(Fn && fn, Args &&... args) |
Attributes🔗
Name | |
---|---|
constexpr usize | kMinStackSizeLog2 |
constexpr usize | kMaxStackSizeLog2 |
constexpr usize | kMaxDebugInfoThreads |
const bool | kTaskDebugInfoSegvCallbackInstalled |
constexpr auto | kCpuCacheLineSize |
const bool | kSigSegvHandlerInstalled |
constexpr usize | kDefaultSmallVecSize |
constexpr bool | IsStatusEnum |
constexpr auto | TupleIndexOf_v |
constexpr bool | IsOneOf Trait that evaluates to true iff T is the same as one of the MatchTs. |
constexpr bool | DecaysToOneOf Trait that evaluates to true iff T decays to one of the MatchTs. |
Types Documentation🔗
enum StackType🔗
Enumerator | Value | Description |
---|---|---|
kFixedSize | 0 | |
kProtectedFixedSize | 1 | |
kPooledFixedSize | 2 | |
kMaxValue |
enum TransferStep🔗
Enumerator | Value | Description |
---|---|---|
kNone | ||
kFetch | ||
kWrite |
enum ReadWriteLockQueueNodeClass🔗
Enumerator | Value | Description |
---|---|---|
kReading | 0 | |
kWriting | 1 |
enum WaitForResource🔗
Enumerator | Value | Description |
---|---|---|
kFalse | false | |
kTrue | true |
enum BoolStatus🔗
Enumerator | Value | Description |
---|---|---|
kUnknown | -1 | |
kFalse | 0 | |
kTrue | 1 |
An enumeration that models boolean (true/false) values plus unknown.
enum InclusiveLowerBound🔗
Enumerator | Value | Description |
---|---|---|
kFalse | false | |
kTrue | true |
enum InclusiveUpperBound🔗
Enumerator | Value | Description |
---|---|---|
kFalse | false | |
kTrue | true |
enum Order🔗
Enumerator | Value | Description |
---|---|---|
Less | -1 | |
Equal | 0 | |
Greater | 1 |
enum StatusCode🔗
Enumerator | Value | Description |
---|---|---|
kOk | 0 | |
kCancelled | 1 | |
kUnknown | 2 | |
kInvalidArgument | 3 | |
kDeadlineExceeded | 4 | |
kNotFound | 5 | |
kAlreadyExists | 6 | |
kPermissionDenied | 7 | |
kResourceExhausted | 8 | |
kFailedPrecondition | 9 | |
kAborted | 10 | |
kOutOfRange | 11 | |
kUnimplemented | 12 | |
kInternal | 13 | |
kUnavailable | 14 | |
kDataLoss | 15 | |
kUnauthenticated | 16 | |
kClosed | 100 | |
kGrantUnavailable | 101 | |
kLoopBreak | 102 | |
kEndOfStream | 103 | |
kClosedBeforeEndOfStream | 104 | |
kGrantRevoked | 105 | |
kPoke | 106 |
enum ErrnoValue🔗
Enumerator | Value | Description |
---|---|---|
enum StdGenericErrorCode🔗
Enumerator | Value | Description |
---|---|---|
enum StdFutureErrorCode🔗
Enumerator | Value | Description |
---|---|---|
enum StdSystemErrorCode🔗
Enumerator | Value | Description |
---|---|---|
enum StdIostreamErrorCode🔗
Enumerator | Value | Description |
---|---|---|
enum LogLevel🔗
Enumerator | Value | Description |
---|---|---|
kFatal | ||
kError | ||
kWarning | ||
kInfo | ||
kDebug | ||
kVerbose |
enum Pretty🔗
Enumerator | Value | Description |
---|---|---|
True | ||
False | ||
Default |
using PartsCount🔗
using PartSize🔗
using RunningTotal🔗
using HasConstBufferSequenceRequirements🔗
using EnableIfConstBufferSequence🔗
using HasBufferSourceRequirements🔗
using EnableIfBufferSource🔗
using Continuation🔗
using StackSize🔗
using FakeExecutor🔗
using Grant🔗
using DefaultHandlerBase🔗
using AbstractHandler🔗
using HandlerImpl🔗
using BasicHandlerList🔗
using HandlerList🔗
using ErrorCode🔗
using MCSMutex🔗
using RateLimiter🔗
using ReadWriteLock🔗
using ScopedReadLock🔗
using ScopedWriteLock🔗
using SimpleExecutor🔗
using TaskCount🔗
using InputSize🔗
using TaskSize🔗
using TaskIndex🔗
using TaskOffset🔗
using ConstBuffer🔗
using MutableBuffer🔗
using HttpClientConnection🔗
using HttpsClientConnection🔗
using IncludeHttpTrailer🔗
using HttpHeader🔗
using HttpRequestDispatcherFn🔗
One request dispatcher is created per accepted connection; it is reused in the context of that connection until the connection is closed.
using HttpRequestDispatcherFactoryFn🔗
Called once per accepted connection.
using Interval🔗
A half-open interval (like STL iterator ranges).
For this type of interval, lower_bound
is the smallest value in the set, and upper_bound
is the value right after the largest value in the set.
Example:
Filename: examples/interval.cpp
\
using CInterval🔗
A closed interval.
For this type of interval, lower_bound
is the smallest value in the set, and upper_bound
is the largest value in the set.
Example:
using DerivedMetric🔗
using MetricLabelSet🔗
using CountMetricExporter🔗
Exports a CountMetric
using GaugeMetricExporter🔗
Exports a GaugeMetric
using Nullable🔗
using UniqueNonOwningPtr🔗
using HasSeqRequirements🔗
using EnableIfSeq🔗
using SeqItem🔗
using RefCounted🔗
using IsRefCounted🔗
using SharedPtr🔗
using Slice🔗
using UniqueSmallFn🔗
A type-erased container for a move-only callable function-like object.
This type can be used to hold copyable functions, but is itself move-only, therefore does not require copy semantics from erased types.
using SmallVec🔗
using SmallVecBase🔗
using PrintToStreamFunctionPointer🔗
using StateMachineEntropySource🔗
using IsStatusOr🔗
using RemoveStatusOr🔗
using Token🔗
using MorphTuple_t🔗
using MapTuple_t🔗
using IsCallable🔗
using IsPrintable🔗
using IsRange🔗
using EnableIfNoShadow🔗
using DecayRValueRef🔗
using CanBeEqCompared🔗
using UnwrapRefType🔗
Functions Documentation🔗
function parallel_accumulate_partial🔗
function parallel_accumulate🔗
function parallel_copy🔗
function parallel_merge🔗
function parallel_merge🔗
function parallel_running_total🔗
function parallel_running_total🔗
function parallel_transform🔗
function strong_typedef_default_value🔗
function strong_typedef_default_value🔗
function fail_check_exit🔗
function fail_check_exit_entered🔗
function fail_check_spin_lock🔗
function ignore🔗
function lock_fail_check_mutex🔗
function async_run_task🔗
Creates and starts (default) a new batt::Task, the memory for which (including stack) is allocated as a single contiguous memory region using the allocated associated with the final arg passed to this function, the completion handler.
The completion handler will automatically be called when the task completes; the memory associated with the task will also be automatically freed before (a copy of) the completion handler is invoked. The completion handler signature is void()
.
function with_retry_policy🔗
function update_retry_state🔗
function has_const_buffer_sequence_requirements🔗
function has_buffer_source_requirements🔗
function operator|🔗
function operator|🔗
function operator|🔗
function operator|🔗
function operator|🔗
function operator|🔗
function operator|🔗
function operator|🔗
function hash_value🔗
CancelToken is hashed by its impl pointer.
function operator==🔗
Returns true iff the two objects are copies of the same CancelToken.
function operator!=🔗
function operator<🔗
function operator>🔗
function operator<=🔗
function operator>=🔗
function is_cancelled🔗
function is_cancelled🔗
function BOOST_PP_CAT🔗
function strong_typedef_default_value🔗
function get_stack_allocator_with_type🔗
function get_stack_allocator🔗
function callcc🔗
function callcc🔗
function this_task_debug_info🔗
function print_debug_info🔗
function print_all_threads_debug_info🔗
function shortened_source_file🔗
function enable_dump_tasks🔗
function operator==🔗
function operator!=🔗
function operator<🔗
function operator>🔗
function operator<=🔗
function operator>=🔗
function fetch_chunk🔗
Awaits the result of an async_fetch on the passed stream with the given minimum chunk size.
The returned chunk object will cause the fetched data to be consumed from the stream by default when it goes out of scope. Some of the fetched data can be left in the stream by calling BasicScopedChunk::back_up.
This function blocks the current task until min_size bytes are available on the stream, or an error occurs (e.g., end-of-stream).
function transfer_chunked_data🔗
function transfer_chunked_data🔗
Fetches data from the first arg and writes it to the second arg, until an error or end-of-file/stream occurs.
Return: The number of bytes transferred if successful, error Status otherwise
In this overload, From should have a public member function fetch_chunk
which returns batt::StatusOrwrite
which takes a boost::asio::const_buffer (batt::ConstBuffer) and returns batt::StatusOr
function futex_wait🔗
function futex_notify🔗
function spin_yield🔗
function get_future🔗
Returns the Future object corresponding to the Promise.
function BOOST_PP_CAT🔗
function push_handler_prealloc🔗
function push_handler🔗
function invoke_all_handlers🔗
function bind_handler🔗
function operator==🔗
function operator!=🔗
function make_custom_alloc_handler🔗
Helper function to wrap a handler object to add custom allocation.
function post_handler🔗
Posts a handler using its associated executor, binding its arguments.
function operator<<🔗
function is_ok_status🔗
function is_ok_status🔗
function to_status🔗
function pin_object🔗
function unpin_object🔗
function make_pin🔗
function operator==🔗
function operator!=🔗
function operator==🔗
function operator!=🔗
function operator==🔗
function operator!=🔗
function operator<<🔗
function operator<<🔗
function operator<<🔗
function strong_typedef_default_value🔗
function strong_typedef_default_value🔗
function strong_typedef_default_value🔗
function strong_typedef_default_value🔗
function strong_typedef_default_value🔗
function get_input_size🔗
function operator<<🔗
function get_task_size🔗
function get_task_count🔗
function operator<<🔗
function slice_work🔗
function operator<<🔗
function operator<<🔗
function next_thread_id🔗
Returns the lowest unused global thread id number; repeated calls to next_thread_id()
will return monotonically increasing values.
function this_thread_id🔗
Returns a reference to the thread-local id for the current thread.
function operator<<🔗
function operator<<🔗
Support for printing Watch
function operator<<🔗
Support for printing WatchAtomic
function bool_status_from🔗
Constructs a BoolStatus value from a bool.
function operator||🔗
Performs a logical-or (disjunction) between two BoolStatus values.
If one of the arguments is BoolStatus::kTrue, then the result is BoolStatus::kTrue. If both arguments are BoolStatus::kFalse, then the result is BoolStatus::kFalse. Otherwise, at least one argument is BoolStatus::kUnknown, and the result is BoolStatus::kUnknown.
function operator&&🔗
Performs a logical-and (conjunction) between two BoolStatus values.
If one of the arguments is BoolStatus::kFalse, then the result is BoolStatus::kFalse. If both arguments are BoolStatus::kTrue, then the result is BoolStatus::kTrue. Otherwise, at least one argument is BoolStatus::kUnknown, and the result is BoolStatus::kUnknown.
function operator!🔗
Performs a logical-not (negation) for the given BoolStatus value.
If b is kUnknown, then the result is also kUnknown. Otherwise kFalse becomes kTrue and vice versa.
function operator<<🔗
Prints a BoolStatus value.
function least_upper_bound🔗
function greatest_lower_bound🔗
function least_upper_bound🔗
function greatest_lower_bound🔗
function least_upper_bound🔗
function greatest_lower_bound🔗
function least_upper_bound🔗
function greatest_lower_bound🔗
function least_upper_bound🔗
function greatest_lower_bound🔗
function least_upper_bound🔗
function greatest_lower_bound🔗
function least_upper_bound🔗
function greatest_lower_bound🔗
function least_upper_bound🔗
function greatest_lower_bound🔗
function least_upper_bound🔗
function operator<🔗
function operator<🔗
function operator<🔗
function operator==🔗
function operator==🔗
function operator==🔗
function operator>🔗
function operator<=🔗
function operator>=🔗
function operator>🔗
function operator<=🔗
function operator>=🔗
function operator>🔗
function operator<=🔗
function operator>=🔗
function operator!=🔗
function operator!=🔗
function operator!=🔗
function greatest_lower_bound🔗
function operator<🔗
function operator<🔗
function operator<🔗
function operator==🔗
function operator==🔗
function operator==🔗
function operator>🔗
function operator<=🔗
function operator>=🔗
function operator>🔗
function operator<=🔗
function operator>=🔗
function operator>🔗
function operator<=🔗
function operator>=🔗
function operator!=🔗
function operator!=🔗
function operator!=🔗
function make_buffer🔗
function buffer_from_struct🔗
function as_str🔗
Converts a ConstBuffer into an equivalent std::string_view.
function bytes_from_struct🔗
Returns a std::string_view with the same size and data address as the passed object, as if the address of val
had been reinterpret_cast to type const char*
.
Should only be used for types used to define serialized data layouts.
function mutable_buffer_from_struct🔗
function resize_buffer🔗
function resize_buffer🔗
function slice_buffer🔗
Select a subset of the passed buffer according to the passed interval.
Parameters:
- b The buffer to slice
- slice Defines the start (inclusive) and end (non-inclusive) of the slice within buffer
function slice_buffer🔗
Select a subset of the passed buffer according to the passed interval.
Parameters:
- b The buffer to slice
- slice Defines the start (inclusive) and end (non-inclusive) of the slice within buffer
function consume_buffers🔗
function consume_buffers_iter🔗
function consume_buffers_copy🔗
function array_from_c_str🔗
Converts a compile-time string constant to std::array
function array_from_c_str🔗
Converts a compile-time string constant to std::array
function as_const_buffer🔗
function as_const_buffer🔗
function as_const_buffer🔗
function as_const_buffer🔗
function as_const_buffer🔗
function as_const_buffer🔗
function as_const_buffer🔗
function as_const_buffer🔗
function as_const_buffer🔗
function as_const_buffer🔗
function as_const_buffer🔗
function make_case_of_visitor🔗
Constructs and returns a single overloaded callable function object that forwards its arguments on to the first object in cases
that is callable with those arguments.
function case_of🔗
Matches a variant against a list of callables and apply the first one that will accept the current value.
Example: ```cpp
std::variant
int result = batt::case_of( var, { return 1; }, { return 2; });
BATT_CHECK_EQ(result, 2);
function checked_cast🔗
function checked_cast🔗
function checked_cast🔗
function operator<<🔗
function compare🔗
function operator<<🔗
function pin_thread_to_cpu🔗
function pin_thread_to_cpu_set🔗
function pin_thread_i_of_config🔗
function do_nothing🔗
function big_endian_less_than🔗
function big_endian_less_than🔗
function big_endian_less_than🔗
function getenv_as🔗
Parse environment variable as a given type T
.
Parameters:
- var_name The environment variable name
Return: The parsed value if var_name
is found and it parses correctly, else batt::None.
function finally🔗
function hash🔗
function hash🔗
function hash_value🔗
function hash🔗
function await_resolve🔗
function await_resolve🔗
function hash_value🔗
function operator==🔗
function operator!=🔗
function operator<<🔗
function http_encode_chunked🔗
function http_request🔗
Submits an HTTP request, returning the response object.
params
must be from the following set:
- HttpHeader: sets a custom Http message header name/value pair
- HttpData: (PUT/POST requests) sets a BufferSource containing the message body
- HttpClient: specifies the HttpClient to use (default is DefaultHttpClient::get())
- HttpResponse*: sets the HttpResponse object to use (default is to allocate a new HttpResponse object); if this option is set, then this function will return
nullptr
on success. - HttpVersion: sets the HTTP protocol version to use. Must be <= 1.1
function http_get🔗
function http_post🔗
function http_put🔗
function http_delete🔗
function strong_typedef_default_value🔗
function find_header🔗
function operator<<🔗
function push_back🔗
function push_front🔗
function pop_back🔗
function pop_front🔗
function make_interval🔗
function operator==🔗
function operator!=🔗
function operator<<🔗
function interval_traits_compatible🔗
function make_printable🔗
Returns a std::ostream-printable representation of the argument, obj
.
This overload is selected for types that support an overloaded operator<<
for std::ostream. It simply forwards the argument as the return value.
function make_printable🔗
Returns a std::ostream-printable representation of the argument, obj
.
This overload is selected for all types that do not support an overloaded operator<<
for std::ostream. It prints the name of the type (demangled), and a hex representation of the bytes of the object itself.
function log2_ceil🔗
Returns log_2(i), rounded down to the nearest integer.
function log2_floor🔗
Returns log_2(i), rounded down to the nearest integer.
function lsb_mask🔗
Least Significant Bits Mask.
Returns a value of type IntT with bits
ones as the least significant bits, and zeros for all other bits.
function round_down_bits🔗
Rounds an integer value down to the nearest multiple of 2^bits.
For example, round_down_bits(8, n) will round n down to the nearest multiple of 256; if n is already a multiple of 256, it will return n.
function round_up_bits🔗
Rounds an integer value up to the nearest multiple of 2^bits.
For example, round_up_bits(8, n) will round n up to the nearest multiple of 256; if n is already a multiple of 256, it will return n.
function round_down_to🔗
Rounds n
down to the nearest multiple of unit
.
function round_up_to🔗
Rounds n
up to the nearest multiple of unit
.
function ipow🔗
Compile-time integer exponentiation.
function bit_count🔗
Returns the number of set (1) bits in the passed integer.
function operator<<🔗
function normalize_labels🔗
function global_metric_registry🔗
function make_nullable🔗
function operator==🔗
function operator!=🔗
function operator==🔗
function operator!=🔗
function operator==🔗
function operator!=🔗
function operator==🔗
function operator!=🔗
function operator==🔗
function operator!=🔗
function operator==🔗
function operator!=🔗
function operator<<🔗
function operator<<🔗
function make_optional🔗
function get_or_panic🔗
function get_or_panic🔗
function get_or_panic🔗
function operator<<🔗
function operator<<🔗
function as_ref🔗
function as_cref🔗
function into_ref🔗
function into_cref🔗
function unwrap_ref🔗
function unwrap_ref🔗
function unwrap_ref🔗
function unwrap_ref🔗
function print_stack_trace_atexit_enabled🔗
function print_stack_trace_atexit🔗
function has_seq_requirements🔗
function skip_n🔗
function operator|🔗
function as_seq🔗
function as_seq🔗
function as_seq🔗
function vec_range🔗
function into_seq🔗
function seq_ref🔗
function make_shared🔗
function make_shared🔗
function into_shared🔗
function shared_ptr_from🔗
function shared_ptr_from🔗
function as_slice🔗
function as_slice🔗
function as_slice🔗
function as_slice🔗
function as_const_slice🔗
function as_const_slice🔗
function as_const_slice🔗
function empty_slice🔗
function as_seq🔗
function as_seq🔗
function as_seq🔗
function as_seq🔗
function as_range🔗
function slice_range🔗
function copy_string🔗
function as_str🔗
function extra_segv_debug_info_callback🔗
function print_stack_trace🔗
function operator<<🔗
function operator==🔗
function hash_value🔗
function combine_results🔗
function operator<<🔗
function static_dispatch🔗
function static_dispatch🔗
function static_dispatch🔗
function operator<<🔗
function operator==🔗
function operator!=🔗
function OkStatus🔗
function operator==🔗
function operator==🔗
function operator!=🔗
function is_ok_status🔗
function is_ok_status🔗
function operator<<🔗
function require_fail_global_default_log_level🔗
function require_fail_thread_default_log_level🔗
function status_from_errno🔗
function to_status🔗
function to_status🔗
function register_error_category🔗
Registers a custom error_category so that error_code objects that use it can be converted to batt::Status via batt::to_status.
Parameters:
- category The category to register
- codes A list of error code values (int or enum type) to register
Return: true (to indicate the registration was successful)
function status_from_error_category🔗
Constructs and returns a batt::Status equivalent to the given code in the given category.
Return: the registered batt::Status value if code is valid; batt::StatusCode::kUnknown otherwise
The passed category must have been registered via batt::register_error_category prior to calling this function.
function status_from_error_code🔗
Constructs and returns a batt::Status equivalent to the given error_code.
Return: the registered batt::Status value if code is valid; batt::StatusCode::kUnknown otherwise
The error_category of the passed object must have been registered via batt::register_error_category prior to calling this function.
function error_code_to_status🔗
function error_code_to_status🔗
function to_status🔗
Converts an error_code (boost::system:: or std::) to a batt::Status value.
function to_status🔗
function status_from_retval🔗
function ok_result_or_panic🔗
function operator<<🔗
function status_is_retryable🔗
function print_all🔗
function print_all🔗
function extract_all🔗
function extract_all🔗
function to_string🔗
function from_string🔗
function c_str_literal🔗
function c_str_literal🔗
function c_str_literal🔗
function make_printable🔗
function make_printable🔗
function make_printable🔗
function make_printable🔗
function make_printable🔗
function make_printable🔗
function make_printable🔗
function make_printable🔗
function StringUpperBound🔗
function operator<<🔗
function operator<<🔗
function dump_hex🔗
function operator<<🔗
function dump_size🔗
function dump_size_exact🔗
function parse_byte_size🔗
Parse a byte size string with optional units.
Return: The parse size in bytes if successful, None otherwise.
Units can be any of:
- 'b': bytes
- 'kb': kilobytes (=1024 bytes)
- 'mb': megabytes (=1024 kilobytes)
- 'gb': gigabytes (=1024 megabytes)
- 'tb': terabytes (=1024 gigabytes)
- 'pb': petabytes (=1024 terabtyes)
- 'eb': eitabytes (=1024 petabytes) The unit string may be upper or lower case, and only the first character is considered, so the string "45k" will parse the same as "45KILOBYTES" or "45Kb", etc.
Simple addition and subtraction will also be evaluated, so for example, the string "16mb-1" will parse to the value 16 * 1024 * 1024 - 1
. No space is allowed between additive terms when using this notation.
function dump_range🔗
function pretty_print_indent🔗
function is_strong_type🔗
function operator+🔗
function operator-🔗
function operator*🔗
function operator/🔗
function syscall_retry🔗
function operator==🔗
function operator!=🔗
function is_any_true🔗
Returns true iff any of the passed arguments evaluates to true (base case; always returns false).
function is_any_true🔗
Returns true iff any of the passed arguments evaluates to true (recursive case; short circuits if first
is true.).
function are_all_true🔗
Returns true iff all of the passed arguments evaluate to true (base case; always returns false).
function are_all_true🔗
Returns true iff any of the passed arguments evaluates to true (recursive case; short circuits if first
is true.).
function name_of🔗
Calculates and returns the demangled name of the given type as a null-terminated C-string.
function name_of🔗
Calculates and returns the demangled name of the given type as a null-terminated C-string.
function name_of🔗
Calculates and returns the demangled name of the given type as a null-terminated C-string.
function unqualified_name_of🔗
Calculates and returns the demangled name of the given type, without the namespace qualifier.
function can_be_empty_base🔗
Returns true iff the specified type can be optimized to zero size via empty base class optimization.
function can_be_empty_base🔗
function operator==🔗
function operator!=🔗
function operator<<🔗
function parse_url🔗
function make_copy🔗
Return a copy of value
.
Supports the "sunk arguments idiom" of always declaring function arguments whose value is copied/retained by the callee as rvalue-references. This idiom maintains optimal efficiency in most cases while providing a signal-boost at call sites that an arg is being copied or moved. Examples:
function sink🔗
function sink🔗
function make_default🔗
Return a default-constructed instance of type T
.
function make_default🔗
function unwrap_ref🔗
function unwrap_ref🔗
function unwrap_ref🔗
function unwrap_ref🔗
function unwrap_ref🔗
function rotate_args_right🔗
function rotate_args_left🔗
Attributes Documentation🔗
variable kMinStackSizeLog2🔗
variable kMaxStackSizeLog2🔗
variable kMaxDebugInfoThreads🔗
variable kTaskDebugInfoSegvCallbackInstalled🔗
variable kCpuCacheLineSize🔗
variable kSigSegvHandlerInstalled🔗
variable kDefaultSmallVecSize🔗
variable IsStatusEnum🔗
variable TupleIndexOf_v🔗
variable IsOneOf🔗
Trait that evaluates to true iff T
is the same as one of the MatchTs.
variable DecaysToOneOf🔗
Trait that evaluates to true iff T
decays to one of the MatchTs.
Updated on 31 January 2025 at 21:21:04 UTC