Namespace Subspace :: sus

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.

  • cmp

    Utilities for comparing and ordering values.

  • Collection types.

  • Concepts and functions for constructing and converting between types.

  • env

    Inspection and manipulation of the process's environment.

  • Interfaces for working with Errors.

  • fn

    The Fn, FnMut and FnOnce concepts for working with functors and callable types.

  • Composable external iteration.

  • Marker types, such as for accessing unsafe APIs, for overload resolution, or type elision.

  • mem
  • num

    Safe integer (e.g. i32) and floating point (e.g. f32) numerics, and numeric concepts.

  • ops
  • The Option type, and the some and none type-deduction constructor functions.

  • 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.

  • ptr
  • The Result type, and the ok and err type-deduction constructor functions.

  • The Tuple type, and the tuple type-deduction constructor function.

Type Aliases

  • A collection of objects of type T, with a fixed size N.

  • 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 concept C, into a reference DynC& that also satisfies C but without templates.

  • Used to construct a Result<T, E> with an Err(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 type T.

  • 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 an Ok(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.