Byte Engine Docs
View on docs.rs

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

ItemKindDescription
utilsmodThe utils module provides engine utility types through the main byte_engine crate API.
animationmodSkeletal animation sampling, pose blending, and transition utilities.
applicationmodApplication lifecycle and composition.
audiomodAudio playback, synthesis, and spatial emitter support.
configurationmodAsynchronous configuration messages used by debugging adapters and engine systems.
coremodShared ownership, messaging, factories, and task primitives.
inputmodDevice-independent input actions and device registration.
uimodRetained UI components, layout evaluation, styling, and rendering.
constantsmodCommon directions in the engine's default coordinate system.
gameplaymodWorld-level gameplay objects and transform coordination.
networkmodBETP client/server integration and replication contracts.
physicsmodPhysics contracts and the built-in Dynabit simulation.
renderingmodRendering orchestration, scene pipelines, and composable post-processing.
spacemodSmall spatial capability traits shared by gameplay, physics, and rendering.
timemodFixed-rate time used by engine simulation and media timelines.
inspectormodRuntime inspection contracts and protocol-facing state access.
MediaTimestruct

Modules

  • utils — The utils module provides engine utility types through the main byte_engine crate 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) -> Self

    Creates a time value from raw engine ticks.

  • const fn as_ticks(self) -> i64

    Returns the raw engine tick count.

  • fn from_seconds(seconds: i64) -> Self

    Creates a time value from a whole number of seconds.

  • fn from_seconds_f64(seconds: f64) -> Self

    Creates a time value from fractional seconds, rounded to the nearest tick.

  • fn from_seconds_f32(seconds: f32) -> Self

    Creates a time value from fractional seconds, rounded to the nearest tick.

  • fn from_millis(milliseconds: i64) -> Self

    Creates a time value from milliseconds.

  • fn from_micros(microseconds: i64) -> Self

    Creates 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 None when the frame rate does not divide the engine timebase or

    when 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 None when the sample rate does not divide the engine timebase or

    when the resulting tick count would overflow.

  • fn from_std(duration: Duration) -> Self

    Converts a standard duration into engine time, rounded to the nearest tick.

  • fn to_std(self) -> Duration

    Converts a non-negative engine time into a standard duration.

  • fn as_seconds_f64(self) -> f64

    Returns this time value as fractional seconds.

  • fn as_seconds_f32(self) -> f32

    Returns this time value as fractional seconds.

  • const fn checked_add(self, rhs: Self) -> Option<Self>

    Returns the sum, or None when it falls outside the timeline range.

  • const fn checked_sub(self, rhs: Self) -> Option<Self>

    Returns the difference, or None when it falls outside the timeline range.

  • const fn saturating_sub(self, rhs: Self) -> Self

    Returns 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) -> MediaTime

    Related: 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() -> MediaTime

    Related: 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::Ordering

    Related: MediaTime

impl PartialEq for MediaTime
  • fn eq(&self, other: &MediaTime) -> bool

    Related: 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)
impl WithSubscriber for MediaTime

On this page