[][src]Module oxygengine::prelude

Modules

binary
changeset

Provides a changeset that can be collected from an iterator.

error

Specs errors

hibitset

hibitset

join

Joining of components for iteration over entities with specific components.

localization
pack
prefab
set
shred

Shared resource dispatcher

shrev

Event channel, pull based, that use a ringbuffer for internal storage, to make it possible to do immutable reads.

storage

Component storage types, implementations for component joins, etc.

text
world

Entities, resources, components, and general world management.

yaml

Structs

App
AppBuilder
AppLifeCycle
AppRunner
Asset
AssetPackPreloader
AssetsDatabase
AssetsSystem
BatchAccessor

The BatchAccessor is used to notify the main dispatcher of the read and write resources of the Systems contained in the batch ("sub systems").

BatchUncheckedWorld

The BatchUncheckedWorld wraps an instance of the world. You have to specify this as SystemData for a System implementing BatchController.

BinaryAsset
BinaryAssetProtocol
BitSet

A BitSet is a simple set designed to track which indices are placed into it.

ChangeSet

Change set that can be collected from an iterator, and joined on for easy application to components.

ComponentContainer
DefaultBatchControllerSystem

The DefaultBatchControllerSystem is a simple implementation that will dispatch the inner dispatcher one time.

DefaultLogger
DefaultVecStorage

Vector storage, like VecStorage, but allows safe access to the interior slices because unused slots are always initialized.

DenseVecStorage

Dense vector storage. Has a redirection 2-way table between entities and components, allowing to leave no gaps within the data.

Dispatcher

The dispatcher struct, allowing systems to be executed in parallel.

DispatcherBuilder

Builder for the Dispatcher.

Entity

Entity type, as seen by the user.

EntityBuilder

The entity builder, allowing to build an entity together with its components.

EventChannel

The EventChannel, which is the central component of shrev.

EventIterator

Iterator over a slice of data in RingBufferStorage.

FetchProcess
FlaggedStorage

Wrapper storage that tracks modifications, insertions, and removals of components through an EventChannel.

FsFetchEngine
FsStorageEngine
Grid2d
Grid2dNeighborSample
HashMapStorage

HashMap-based storage. Best suited for rare components.

HierarchyChangeRes
ID

Typed Unique Identifier (uuidv4).

LazyUpdate

Lazy updates can be used for world updates that need to borrow a lot of resources and as such should better be done at the end. They work lazily in the sense that they are dispatched when calling world.maintain().

Localization
LocalizationAsset
LocalizationAssetProtocol
LocalizationSystem
LoggerAssetsDatabaseErrorReporter
MapFetchEngine
MapStorageEngine
Name
NoiseMapGenerator
NonPersistent
NonPersistentPrefabProxy
NullStorage

A null storage type, used for cases where the component doesn't contain any data and instead works as a simple flag.

PackAsset
PackAssetProtocol
Parent
ParentPrefabProxy
PrefabAsset
PrefabAssetProtocol
PrefabManager
PrefabNumber

Represents a YAML number, whether integer or floating point.

PrefabScene
PrefabSceneEntityData
PrefabSystem
Read

Allows to fetch a resource in a system immutably.

ReaderId

A reader ID which represents a subscription to the events pushed to the EventChannel.

SetAsset
SetAssetProtocol
StandardAppTimer
StaticAccessor

The static accessor that is used for SystemData.

Storage

A wrapper around the masked storage and the generations vector. Can be used for safe lookup of components, insertions and removes. This is what World::read/write fetches for the user.

SyncAppRunner
Tag
TextAsset
TextAssetProtocol
VecStorage

Vector storage. Uses a simple Vec. Supposed to have maximum performance for the components mostly present in entities.

World

A Resource container, which provides methods to insert, access and manage the contained resources.

Write

Allows to fetch a resource in a system mutably.

YamlAsset
YamlAssetProtocol

Enums

AccessorCow

Either an Accessor of the system T or a reference to it.

AssetLoadResult
AssetVariant
FetchCancelReason
FetchStatus
Grid2dError
LoadStatus
Log
PrefabError
PrefabSceneEntity
PrefabValue

Represents any valid YAML value.

Rule
RunningTime
StateChange
StorageError

Traits

Accessor

A trait for accessing read/write multiple resources from a system. This can be used to create dynamic systems that don't specify what they fetch at compile-time.

AppTimer
AssetProtocol
AssetsDatabaseErrorReporter
BackendAppRunner
BatchController

The BatchController is the additional trait that a normal System must implement in order to be used as a system controlling the execution of a batch.

Builder

A common trait for EntityBuilder and LazyBuilder, allowing either to be used. Entity is definitely alive, but the components may or may not exist before a call to World::maintain.

Component

Abstract component type. Doesn't have to be Copy or even Clone.

ComponentContainerModify
Event

Marker trait for data to use with the EventChannel.

FetchEngine
FetchProcessReader
Join

The purpose of the Join trait is to provide a way to access multiple storages at the same time with the merged bit set.

Logger
Prefab
PrefabComponent
PrefabProxy
Resource

A resource is a data slot which lives in the World can only be accessed according to Rust's typical borrowing model (one writer xor multiple readers).

RunNow

Trait for fetching data and running systems. Automatically implemented for systems.

State
StorageEngine
System

A System, executed with a set of required Resources.

SystemData

A static system data that can specify its dependencies at statically (at compile-time). Most system data is a SystemData, the DynamicSystemData type is only needed for very special setups.

Tracked

UnprotectedStorages that track modifications, insertions, and removals of components.

WorldExt

This trait provides some extension methods to make working with shred's World easier.

Functions

bundle_installer
entity_find_direct
entity_find_world
hierarchy_find_direct
hierarchy_find_world
logger_log
logger_setup

Type Definitions

AssetID
Entities

A wrapper for a read Entities resource. Note that this is just Read<Entities>, so you can easily use it in your system:

FetchProcessID
Grid2dCommonAreas
HierarchyRes
Meta
ReadExpect

Allows to fetch a resource in a system immutably. This will panic if the resource does not exist. Usage of Read or Option<Read> is therefore recommended.

ReadStorage

A storage with read access.

Scalar
StateToken
StorageResult
WriteExpect

Allows to fetch a resource in a system mutably. This will panic if the resource does not exist. Usage of Write or Option<Write> is therefore recommended.

WriteStorage

A storage with read and write access.

Derive Macros

Ignite
SystemData

Used to #[derive] the trait SystemData.