application
Generated Rust API reference for byte_engine.
Module application
Application lifecycle and composition.
Use BaseApplication when building a custom runtime that only needs parameter
handling and frame-local storage. Headed applications should start with
GraphicsApplication and choose either default_setup or individual
graphics setup functions.
The triangle example demonstrates the standard setup path, while the
window example demonstrates selecting only one setup component.
Contents
Quick Reference
| Item | Kind | Description |
|---|---|---|
application | mod | Core application contract and the minimal implementation used by higher-level runtimes. |
thread | mod | Worker-thread support for application-owned subsystems. |
graphics | mod | Headed application runtime and graphics setup entry points. |
BaseApplication | struct | |
Time | struct | The [Time] struct provides frame timing to application systems without exposing the lifecycle clock owned by the application. |
Parameter | struct | The [Parameter] struct represents one application configuration value from code, the environment, or command-line arguments. |
Events | enum | The [Events] enum defines messages shared with application-owned worker threads. |
Application | trait |
Modules
application— Core application contract and the minimal implementation used by higher-level runtimes.thread— Worker-thread support for application-owned subsystems.graphics— Headed application runtime and graphics setup entry points.
Structs
BaseApplication
struct BaseApplication {
// [REDACTED: Private Fields]
}Defined in crates/byte-engine/src/application/application.rs:35-39
The BaseApplication struct provides shared process configuration and
frame-local storage for application implementations.
Embed it in a specialized application rather than using it as a complete game
loop. GraphicsApplication uses the established headed composition pattern.
Trait Implementations
impl Application for BaseApplication
-
fn new(name: &str, parameters: &[Parameter]) -> BaseApplicationRelated:
Parameter,BaseApplication -
fn tick(&mut self) -> bool -
fn get_name(&self) -> &str
impl ArchivePointee for BaseApplication
-
type ArchivedMetadata = () -
fn pointer_metadata(_: &<T as ArchivePointee>::ArchivedMetadata) -> <T as Pointee>::Metadata
impl<ST> CastableFrom for BaseApplication
impl Downcast for BaseApplication
-
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 BaseApplication
-
fn into_any_send(self: Box<T>) -> Box<dyn Any + Send>
impl Instrument for BaseApplication
impl LayoutRaw for BaseApplication
-
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
impl<T, N1> Niching for BaseApplication
-
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool -
fn resolve_niched(out: Place<NichedOption<T, N1>>)
impl Pointable for BaseApplication
-
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 BaseApplication
-
type Metadata = ()
impl Read for BaseApplication
impl WithSubscriber for BaseApplication
Time
struct Time {
// [REDACTED: Private Fields]
}Defined in crates/byte-engine/src/application/mod.rs:29-32
The Time struct provides frame timing to application systems without exposing
the lifecycle clock owned by the application.
Implementations
-
fn new(elapsed: MediaTime, delta: MediaTime) -> SelfRelated:
MediaTimeCreates frame timing data for systems that run inside an application tick.
-
fn elapsed(&self) -> MediaTimeRelated:
MediaTimeReturns the total time since the application started.
-
fn delta(&self) -> MediaTimeRelated:
MediaTimeReturns the time since the previous application tick.
Trait Implementations
impl ArchivePointee for Time
-
type ArchivedMetadata = () -
fn pointer_metadata(_: &<T as ArchivePointee>::ArchivedMetadata) -> <T as Pointee>::Metadata
impl<ST> CastableFrom for Time
impl Clone for Time
-
fn clone(&self) -> TimeRelated:
Time
impl Copy for Time
impl Debug for Time
-
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result
impl Downcast for Time
-
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 Time
-
fn into_any_send(self: Box<T>) -> Box<dyn Any + Send>
impl DowncastSync for Time
-
fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send>
impl Instrument for Time
impl LayoutRaw for Time
-
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
impl<T, N1> Niching for Time
-
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool -
fn resolve_niched(out: Place<NichedOption<T, N1>>)
impl Pointable for Time
-
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 Time
-
type Metadata = ()
impl Read for Time
impl WithSubscriber for Time
Parameter
struct Parameter {
// [REDACTED: Private Fields]
}Defined in crates/byte-engine/src/application/mod.rs:54-57
The Parameter struct represents one application configuration value from
code, the environment, or command-line arguments.
Implementations
-
fn new(name: &str, value: &str) -> SelfCreates a parameter from borrowed name and value strings.
-
fn new_string(name: String, value: String) -> SelfCreates a parameter from owned name and value strings.
-
fn is(&self, name: &str) -> boolReturns whether this parameter has the requested name.
-
fn as_bool(&self) -> Option<bool>Parses the parameter's value as a bool.
Returns
Some(true)fortrue,TRUE, or1. ReturnsSome(false)forfalse,FALSE, or0. ReturnsNonefor all other values. -
fn as_bool_simple(&self) -> boolParses the parameter as a Boolean value and returns
falseif parsing fails.Use
Self::as_boolwhen the caller must distinguishfalsefrom aninvalid value.
-
fn name(&self) -> &strReturns the parameter name used by application configuration lookup.
-
fn value(&self) -> &strReturns the raw parameter value before caller-specific parsing.
Trait Implementations
impl ArchivePointee for Parameter
-
type ArchivedMetadata = () -
fn pointer_metadata(_: &<T as ArchivePointee>::ArchivedMetadata) -> <T as Pointee>::Metadata
impl<ST> CastableFrom for Parameter
impl Clone for Parameter
-
fn clone(&self) -> ParameterRelated:
Parameter
impl Debug for Parameter
-
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result
impl Downcast for Parameter
-
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 Parameter
-
fn into_any_send(self: Box<T>) -> Box<dyn Any + Send>
impl DowncastSync for Parameter
-
fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send>
impl Eq for Parameter
impl<K> Equivalent for Parameter
-
fn equivalent(&self, key: &K) -> bool
impl Hash for Parameter
-
fn hash<__H: hash::Hasher>(&self, state: &mut __H)
impl Instrument for Parameter
impl LayoutRaw for Parameter
-
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
impl<T, N1> Niching for Parameter
-
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool -
fn resolve_niched(out: Place<NichedOption<T, N1>>)
impl PartialEq for Parameter
-
fn eq(&self, other: &Parameter) -> boolRelated:
Parameter
impl Pointable for Parameter
-
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 Parameter
-
type Metadata = ()
impl Read for Parameter
impl StructuralPartialEq for Parameter
impl WithSubscriber for Parameter
Enums
Events
enum Events {
Close,
}Defined in crates/byte-engine/src/application/mod.rs:111-114
The Events enum defines messages shared with application-owned worker threads.
Variants
-
CloseRequests that the application close.
Trait Implementations
impl ArchivePointee for Events
-
type ArchivedMetadata = () -
fn pointer_metadata(_: &<T as ArchivePointee>::ArchivedMetadata) -> <T as Pointee>::Metadata
impl<ST> CastableFrom for Events
impl Clone for Events
-
fn clone(&self) -> EventsRelated:
Events
impl Copy for Events
impl Debug for Events
-
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result
impl Downcast for Events
-
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 Events
-
fn into_any_send(self: Box<T>) -> Box<dyn Any + Send>
impl DowncastSync for Events
-
fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send>
impl Eq for Events
impl<K> Equivalent for Events
-
fn equivalent(&self, key: &K) -> bool
impl Instrument for Events
impl LayoutRaw for Events
-
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
impl<T, N1> Niching for Events
-
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool -
fn resolve_niched(out: Place<NichedOption<T, N1>>)
impl PartialEq for Events
-
fn eq(&self, other: &Events) -> boolRelated:
Events
impl Pointable for Events
-
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 Events
-
type Metadata = ()
impl Read for Events
impl StructuralPartialEq for Events
impl WithSubscriber for Events
Traits
Application
trait Application { ... }Defined in crates/byte-engine/src/application/application.rs:19-28
The Application trait defines the lifecycle contract for a process-level
Byte-Engine runtime.
Applications are intended to be singletons that own engine-wide state. Most
headed programs should use GraphicsApplication instead of implementing this
trait directly.
Parameters passed to Application::new may be overridden by BE_*
environment variables and then by --name=value command-line arguments.
Required Methods
-
fn new(name: &str, parameters: &[Parameter]) -> SelfCreates an application with the specified name and configuration parameters.
-
fn get_name(&self) -> &strReturns the name of the application.
-
fn tick(&mut self) -> boolAdvances the application by one tick.