Crate core

Source
Expand description

Core data structures and algorithms used throughout Fyrox.

Some of them can be useful separately outside the engine.

Modules§

algebra
nalgebra
arrayvec
arrayvec provides the types ArrayVec and ArrayString: array-backed vector and string types, which store their contents inline.
byteorder
This crate provides convenience methods for encoding and decoding numbers in either big-endian or little-endian order.
color
color_gradient
early
futures
Abstractions for asynchronous programming.
instant
io
log
Simple logger. By default, it writes in the console only. To enable logging into a file, call Log::set_file_name somewhere in your main function.
math
net
notify
Cross-platform file system notification library
num_traits
Numeric traits for generic mathematics
numeric_range
parking_lot
This library provides implementations of Mutex, RwLock, Condvar and Once that are smaller, faster and more flexible than those in the Rust standard library. It also provides a ReentrantMutex type.
pool
A generational arena - a contiguous growable array type which allows removing from the middle without shifting and therefore without invalidating other indices.
quadtree
rand
Utilities for random number generation
rectpack
reflect
Runtime reflection
sparse
sstorage
Immutable string + immutable string storage. See docs of ImmutableString and ImmutableStringStorage for more info.
task
type_traits
uuid
Generate and parse universally unique identifiers (UUIDs).
variable
A wrapper for a variable that hold additional flag that tells that initial value was changed in runtime.
visitor
Visitor is a tree-based serializer/deserializer.
watcher
Resource watcher allows you to track changed resources and “tell” resource manager to reload them.

Macros§

blank_reflect
define_is_as
Defines as_(variant), as_mut_(variant) and is_(variant) methods.
delegate_reflect
err
impl_component_provider
Implements ComponentProvider::query_component_ref and ComponentProvider::query_component_mut in a much shorter way.
info
newtype_reflect
ok_or_break
ok_or_continue
ok_or_return
some_or_break
some_or_continue
some_or_return
stub_uuid_provider
uuid
Parse Uuids from string literals at compile time.
uuid_provider
warn

Structs§

BiDirHashMap
ImmutableString
Immutable string is a string with constant content. Immutability gives some nice properties:
PhantomDataSendSync
Uuid
A Universally Unique Identifier (UUID).

Traits§

ComponentProvider
Component provider provides dynamic access to inner components of an object by their type id.
Downcast
A simple trait for downcasting through Any trait.
NameProvider
A trait for entities that have name.
TypeUuidProvider
A trait for an entity that has unique type identifier.

Functions§

append_extension
Appends specified extension to the path.
array_as_u8_slice
“Transmutes” array of any sized type to a slice of bytes.
array_as_u8_slice_mut
“Transmutes” array of any sized type to a slice of bytes.
cmp_strings_case_insensitive
Compares two strings using case-insensitive comparison. This function does not allocate any any memory and significantly faster than a.to_lowercase() == b.to_lowercase().
combine_uuids
find_by_name_mut
Tries to find an entity by its name in a series of entities produced by an iterator.
find_by_name_ref
Tries to find an entity by its name in a series of entities produced by an iterator.
hash_as_bytes
Performs hashing of a sized value by interpreting it as raw memory.
hash_combine
make_pretty_type_name
make_relative_path
Strip working directory from file name. The function may fail for one main reason - input path is not valid, does not exist, or there is some other issues with it.
replace_slashes
Utility function that replaces back slashes \ to forward /. Internally, it converts the input path to string (lossy - see Path::to_string_lossy) and replaces the slashes in the string. Finally, it converts the string to the PathBuf and returns it. This method is intended to be used only for paths, that does not contain non-unicode characters.
swap_hash_map_entries
Swaps the content of two hash map entries.
swap_hash_map_entry
Swaps the content of a hash map entry with the content of an Option.
transmute_slice
“Transmutes” array of any sized type to a slice of some other type.
transmute_vec_as_bytes
Takes a vector of trivially-copyable values and turns it into a vector of bytes.
value_as_u8_slice
“Transmutes” value of any sized type to a slice of bytes.

Derive Macros§

ComponentProvider
Implements ComponentProvider trait
TypeUuidProvider
Implements TypeUuidProvider trait