The root namespace of the Subspace C++ library.
Everything in the library lives in nested namespaces, for the most part, but
some common things are promoted up to the sus
namespace as aliases.
Namespaces
-
Checking for (e.g.
sus_check
) and handling (e.g.sus_panic
,sus_unreachable
) unexpected runtime conditions. -
The
Box<T>
type for heap allocation and other tools for type-erasure of concepts. -
The
Choice
type. -
Utilities for comparing and ordering values.
-
Collection types.
-
-
Concepts and functions for constructing and converting between types.
-
Inspection and manipulation of the process's environment.
-
Interfaces for working with Errors.
-
Composable external iteration.
-
Marker types, such as for accessing unsafe APIs, for overload resolution, or type elision.
-
-
-
Commonly used things that can be pulled into the global top level namespace. This is done by default when including the
sus/prelude.h
header. -
Type Aliases
-
A collection of objects of type
T
, with a fixed sizeN
. -
A heap allocated object.
-
A tagged union, or sum type.
-
The
Option
type. -
-
A dynamically-sized const view into a contiguous sequence of objects of type
const T
. -
A dynamically-sized mutable view into a contiguous sequence of objects of type
T
. -
A Tuple is a finite sequence of one or more heterogeneous values.
-
A resizeable contiguous buffer of type
T
. -
A 32-bit floating point type.
-
A 64-bit floating point type.
-
A 16-bit signed integer.
-
A 32-bit signed integer.
-
A 64-bit signed integer.
-
An 8-bit signed integer.
-
An address-sized signed integer.
-
A 16-bit unsigned integer.
-
A 32-bit unsigned integer.
-
A 64-bit unsigned integer.
-
An 8-bit unsigned integer.
-
A pointer-sized unsigned integer.
-
An address-sized unsigned integer.
Function Aliases
-
An infallible conversion (cast) that may lose the original value in the process.
-
Clones the input either by copying or cloning. Returns a new object of type
T
. -
Performs copy-assignment from
source
. -
Returns the data size of the type
T
. -
Type erases a reference to a type
T&
which satisfies a conceptC
, into a referenceDynC&
that also satisfiesC
but without templates. -
Used to construct a
Result<T, E>
with anErr(e)
value. -
Move from non-reference values but pass through and preserve references.
-
Converts from the given value to whatever a receiver requires.
-
Cast
t
to an r-value reference so that it can be used to construct or be assigned to a (non-reference) object of typeT
. -
Moves from and converts from the given value to whatever a receiver requires.
-
Used to construct an option with a None value.
-
Used to construct a
Result<T, E>
with anOk(t)
value. -
Returns the size of the type
T
. -
Used to construct an option with a Some(t) value.
-
Attempts to convert from the given value to a
ToType
. -
Used to construct a
Tuple
with the parameters as its values.
Variable Aliases
-
The global
EmptyMarker
which can be passed to constructors to allow type deduction instead of having to write out the full default constructor.