Module geng::prelude

source ·

Re-exports§

Modules§

Macros§

  • Construct an ad-hoc error from a string or existing non-anyhow error value.
  • Create a BTreeMap from a list of key-value pairs
  • Create a BTreeSet from a list of elements.
  • calls a macro provided as argument for tuples of all sizes
  • Create a HashMap from a list of key-value pairs
  • Create a HashSet from a list of elements.
  • Create an iterator running multiple iterators in lockstep.
  • Pins a value on the stack.

Structs§

  • 2d Axis aligned bounding box.
  • This struct represents an angle in 2d space,
  • A thread-safe reference-counting pointer. ‘Arc’ stands for ‘Atomically Reference Counted’.
  • 2-dimensional camera.
  • Represents a cardinal spline.
  • A mutable memory location.
  • A polygonal chain connecting a vector of points in space
  • A collection of identifiable entities
  • A difference between two collections
  • Represents a single interval of the curve.
  • Main object responsible of managing gamepads.
  • A hash map implemented with quadratic probing and SIMD lookup.
  • A hash set implemented as a HashMap where the value is ().
  • HSLA color. Convert into/from Rgba via the From and Into traits.
  • HSVA Color
  • A mutual exclusion primitive useful for protecting shared data
  • Zero-sized type used to mark things that “act like” they own a T.
  • A pointer which pins its pointee in place.
  • A 2d quad
  • A (half-open) range bounded inclusively below and exclusively above (start..end).
  • A range only bounded inclusively below (start..).
  • An unbounded range (..).
  • A range bounded inclusively below and above (start..=end).
  • A range only bounded exclusively above (..end).
  • A range only bounded inclusively above (..=end).
  • A single-threaded reference-counting pointer. ‘Rc’ stands for ‘Reference Counted’.
  • Wrapper around T that checks for valid values (panics on NaN/Inf)
  • Wraps a borrowed reference to a value in a RefCell box. A wrapper type for an immutably borrowed value from a RefCell<T>.
  • A mutable memory location with dynamically checked borrow rules
  • A wrapper type for a mutably borrowed value from a RefCell<T>.
  • RGBA Color
  • A 2d segment
  • The standard RNG. The PRNG algorithm in StdRng is chosen to be efficient on the current platform, to be statistically strong and unpredictable (meaning a cryptographically secure PRNG).
  • A reference to the thread-local generator
  • Timer can be used to track time since some instant
  • Represents any curve given by a parametric function f(t).
  • A reference to a 2d object with additional transformation applied
  • Uniform RealImpl sampler
  • Data structure used to provide access to coordinates with the dot notation, e.g. v.x
  • Data structure used to provide access to coordinates with the dot notation, e.g. v.x
  • Data structure used to provide access to coordinates with the dot notation, e.g. v.x
  • 3x3 matrix
  • 4x4 matrix
  • 2 dimensional vector.
  • 3 dimensional vector.
  • 4 dimensional vector.

Enums§

Constants§

Traits§

  • Represents any 2d camera.
  • Represents any 3d camera.
  • The addition operator +.
  • The addition assignment operator +=.
  • Implement this for types you want to check for approximate equality
  • Read bytes asynchronously.
  • Read bytes asynchronously.
  • Seek bytes asynchronously.
  • Write bytes asynchronously.
  • A BufRead is a type of Reader which has an internal buffer, allowing it to perform extra ways of reading.
  • Provides methods for clamping values
  • A trait representing a color component in a color.
  • A trait representing a curve defined by intervals with key points and tangents.
  • A trait representing a generic curve.
  • ? formatting.
  • Used for immutable dereferencing operations, like *v.
  • Used for mutable dereferencing operations, like in *v = 1;.
  • A data structure that can be deserialized from any data format supported by Serde.
  • A data structure that can be deserialized without borrowing any data from the deserializer.
  • A diffable type
  • Format trait for an empty format, {}.
  • The division operator /.
  • The division assignment operator /=.
  • This trait is implemented by any type that implements [std::clone::Clone].
  • Represents a type that can be used to fit Transform2d objects into
  • Same as RangeBounds but without exclusive bounds
  • Floating point number, including NaN/Inf
  • A future represents an asynchronous computation obtained by use of async.
  • An identifiable entity
  • A hashable type.
  • Used for indexing operations (container[index]) in immutable contexts.
  • Used for indexing operations (container[index]) in mutable contexts.
  • Extension trait for getting index ranges
  • Extension trait on iterators, providing random sampling methods.
  • Extension trait for getting minimum/maximum of values grouped together
  • The multiplication operator *.
  • The multiplication assignment operator *=.
  • The unary negation operator -.
  • Generic signed number type
  • Extension trait for getting minimum/maximum of values grouped together
  • RangeBounds is implemented by Rust’s built-in range types, produced by range syntax like .., a.., ..b, ..=c, d..e, or f..=g.
  • The Read trait allows for reading bytes from a source.
  • Real number (differs from Float as doesn’t support NaN)
  • The remainder operator %.
  • The remainder assignment operator %=.
  • An automatically-implemented extension trait on RngCore providing high-level generic methods for sampling values and other convenience methods.
  • The core of a random number generator.
  • Extends Rng with more methods
  • A random number generator that can be explicitly seeded.
  • A data structure that can be serialized into any data format supported by Serde.
  • A Sink is a value into which other values can be sent, asynchronously.
  • Extension trait on slices, providing random mutation and sampling methods.
  • A stream of values produced asynchronously.
  • The subtraction operator -.
  • The subtraction assignment operator -=.
  • An object in 2d space, bounded by a Quad
  • Extra methods for Transform2d types
  • Simple and safe type conversions that may fail in a controlled way under some circumstances. It is the reciprocal of TryInto.
  • A convenience for futures that return Result values that includes a variety of adapters tailored to such futures.
  • An attempted conversion that consumes self, which may or may not be expensive.
  • A convenience for streams that return Result values that includes a variety of adapters tailored to such futures.
  • Generic number, possibly unsigned
  • A trait for objects which are byte-oriented sinks.
  • Provides the context method for Result.

Functions§

  • &T —▸ Box<T>
  • Construct default value of a type
  • Compares and returns the maximum of two values.
  • Compares and returns the minimum of two values.
  • Compares arguments and returns (min, max)
  • Compares and returns the maximum of two values
  • Compares and returns the minimum of two values
  • Compares arguments and returns (min, max)
  • Construct a new R32 from an f32
  • Construct a new R64 from an f64
  • Find the directory where the program is running from
  • Retrieve the lazily-initialized thread-local random number generator, seeded by the system. Intended to be used in method chaining style, e.g. thread_rng().gen::<i32>(), or cached locally, e.g. let mut rng = thread_rng();. Invoked by the Default trait, making ThreadRng::default() equivalent.

Type Aliases§

  • Like f32 but panics on NaN/Inf
  • Like f64 but panics on NaN/Inf
  • Equivalent to C’s char type.
  • Equivalent to C’s double type.
  • Equivalent to C’s float type.
  • Equivalent to C’s signed int (int) type.
  • Equivalent to C’s signed long (long) type.
  • Equivalent to C’s signed short (short) type.
  • Equivalent to C’s unsigned long type.
  • Equivalent to C’s unsigned short type.
  • Equivalent to C’s void type when used as a pointer.

Attribute Macros§

Derive Macros§