byte_engine
Generated Rust API reference for byte_engine.
Crate byte_engine
Byte-Engine is a composable Rust game engine for applications that need graphics, input, audio, physics, and retained UI in one runtime.
Headed applications usually start with GraphicsApplication and default_setup.
Lower-level users can compose application::BaseApplication, factories,
channels, render passes, and UI layout pieces directly.
use byte_engine::application::{Application, Parameter};
use byte_engine::application::graphics::{default_setup, GraphicsApplication};
let mut application = GraphicsApplication::new("example", &[] as &[Parameter]);
default_setup(&mut application);Start with the getting started guide for installation, project setup, and the first application workflow.
Contents
Quick Reference
| Item | Kind | Description |
|---|---|---|
utils | mod | The utils module provides engine utility types through the main byte_engine crate API. |
animation | mod | Skeletal animation sampling, pose blending, and transition utilities. |
application | mod | Application lifecycle and composition. |
audio | mod | Audio playback, synthesis, and spatial emitter support. |
configuration | mod | Asynchronous configuration messages used by debugging adapters and engine systems. |
core | mod | Shared ownership, messaging, factories, and task primitives. |
input | mod | Device-independent input actions and device registration. |
ui | mod | Retained UI components, layout evaluation, styling, and rendering. |
constants | mod | Common directions in the engine's default coordinate system. |
gameplay | mod | World-level gameplay objects and transform coordination. |
network | mod | BETP client/server integration and replication contracts. |
physics | mod | Physics contracts and the built-in Dynabit simulation. |
rendering | mod | Rendering orchestration, scene pipelines, and composable post-processing. |
space | mod | Small spatial capability traits shared by gameplay, physics, and rendering. |
time | mod | Fixed-rate time used by engine simulation and media timelines. |
inspector | mod | Runtime inspection contracts and protocol-facing state access. |
MediaTime | struct |
Modules
utils— Theutilsmodule provides engine utility types through the mainbyte_enginecrate API.animation— Skeletal animation sampling, pose blending, and transition utilities.application— Application lifecycle and composition.audio— Audio playback, synthesis, and spatial emitter support.configuration— Asynchronous configuration messages used by debugging adapters and engine systems.core— Shared ownership, messaging, factories, and task primitives.input— Device-independent input actions and device registration.ui— Retained UI components, layout evaluation, styling, and rendering.constants— Common directions in the engine's default coordinate system.gameplay— World-level gameplay objects and transform coordination.network— BETP client/server integration and replication contracts.physics— Physics contracts and the built-in Dynabit simulation.rendering— Rendering orchestration, scene pipelines, and composable post-processing.space— Small spatial capability traits shared by gameplay, physics, and rendering.time— Fixed-rate time used by engine simulation and media timelines.inspector— Runtime inspection contracts and protocol-facing state access.
Structs
MediaTime
struct MediaTime();Defined in crates/byte-engine/src/time.rs:20
The MediaTime struct provides a shared, allocation-free time unit for
simulation, animation, and media synchronization.
Implementations
-
const ZERO: Self -
const MIN: Self -
const MAX: Self -
const TICKS_PER_SECOND: i64 -
const fn from_ticks(ticks: i64) -> SelfCreates a time value from raw engine ticks.
-
const fn as_ticks(self) -> i64Returns the raw engine tick count.
-
fn from_seconds(seconds: i64) -> SelfCreates a time value from a whole number of seconds.
-
fn from_seconds_f64(seconds: f64) -> SelfCreates a time value from fractional seconds, rounded to the nearest tick.
-
fn from_seconds_f32(seconds: f32) -> SelfCreates a time value from fractional seconds, rounded to the nearest tick.
-
fn from_millis(milliseconds: i64) -> SelfCreates a time value from milliseconds.
-
fn from_micros(microseconds: i64) -> SelfCreates a time value from microseconds, rounded to the nearest tick.
-
fn from_frames(frame_count: i64, frames_per_second: u32) -> Option<Self>Creates the duration occupied by an exact number of frames.
Returns
Nonewhen the frame rate does not divide the engine timebase orwhen the resulting tick count would overflow.
-
fn from_samples(sample_count: i64, samples_per_second: u32) -> Option<Self>Creates the duration occupied by an exact number of audio samples.
Returns
Nonewhen the sample rate does not divide the engine timebase orwhen the resulting tick count would overflow.
-
fn from_std(duration: Duration) -> SelfConverts a standard duration into engine time, rounded to the nearest tick.
-
fn to_std(self) -> DurationConverts a non-negative engine time into a standard duration.
-
fn as_seconds_f64(self) -> f64Returns this time value as fractional seconds.
-
fn as_seconds_f32(self) -> f32Returns this time value as fractional seconds.
-
const fn checked_add(self, rhs: Self) -> Option<Self>Returns the sum, or
Nonewhen it falls outside the timeline range. -
const fn checked_sub(self, rhs: Self) -> Option<Self>Returns the difference, or
Nonewhen it falls outside the timeline range. -
const fn saturating_sub(self, rhs: Self) -> SelfReturns the difference clamped to the timeline range.
Trait Implementations
impl Add for MediaTime
-
type Output = MediaTime -
fn add(self, rhs: Self) -> <Self as >::Output
impl AddAssign for MediaTime
-
fn add_assign(&mut self, rhs: Self)
impl ArchivePointee for MediaTime
-
type ArchivedMetadata = () -
fn pointer_metadata(_: &<T as ArchivePointee>::ArchivedMetadata) -> <T as Pointee>::Metadata
impl<ST> CastableFrom for MediaTime
impl Clone for MediaTime
-
fn clone(&self) -> MediaTimeRelated:
MediaTime
impl<K> Comparable for MediaTime
-
fn compare(&self, key: &K) -> Ordering
impl Copy for MediaTime
impl Debug for MediaTime
-
fn fmt(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result
impl Default for MediaTime
-
fn default() -> MediaTimeRelated:
MediaTime
impl Div for MediaTime
-
type Output = MediaTime -
fn div(self, rhs: i64) -> <Self as >::Output
impl Downcast for MediaTime
-
fn into_any(self: Box<T>) -> Box<dyn Any> -
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any> -
fn as_any(&self) -> &dyn Any -
fn as_any_mut(&mut self) -> &mut dyn Any
impl DowncastSend for MediaTime
-
fn into_any_send(self: Box<T>) -> Box<dyn Any + Send>
impl DowncastSync for MediaTime
-
fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send>
impl Eq for MediaTime
impl<K> Equivalent for MediaTime
-
fn equivalent(&self, key: &K) -> bool
impl Hash for MediaTime
-
fn hash<__H: hash::Hasher>(&self, state: &mut __H)
impl Instrument for MediaTime
impl LayoutRaw for MediaTime
-
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
impl Mul for MediaTime
-
type Output = MediaTime -
fn mul(self, rhs: i64) -> <Self as >::Output
impl Neg for MediaTime
-
type Output = MediaTime -
fn neg(self) -> <Self as >::Output
impl<T, N1> Niching for MediaTime
-
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool -
fn resolve_niched(out: Place<NichedOption<T, N1>>)
impl Ord for MediaTime
-
fn cmp(&self, other: &MediaTime) -> cmp::OrderingRelated:
MediaTime
impl PartialEq for MediaTime
-
fn eq(&self, other: &MediaTime) -> boolRelated:
MediaTime
impl PartialOrd for MediaTime
-
fn partial_cmp(&self, other: &MediaTime) -> option::Option<cmp::Ordering>Related:
MediaTime
impl Pointable for MediaTime
-
const ALIGN: usize -
type Init = T -
unsafe fn init(init: <T as Pointable>::Init) -> usize -
unsafe fn deref<'a>(ptr: usize) -> &'a T -
unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T -
unsafe fn drop(ptr: usize)
impl Pointee for MediaTime
-
type Metadata = ()
impl Read for MediaTime
impl<R> ReadPrimitive for MediaTime
impl StructuralPartialEq for MediaTime
impl Sub for MediaTime
-
type Output = MediaTime -
fn sub(self, rhs: Self) -> <Self as >::Output
impl SubAssign for MediaTime
-
fn sub_assign(&mut self, rhs: Self)