pub struct Application(/* private fields */);
Expand description
The main entity that provides entrypoints to the event loop and other API.
Any program that uses the b3-core crate must create an instance of this structure before using any other crate’s entities.
Implementations§
Source§impl Application
impl Application
Sourcepub fn new() -> Result<Self, Error>
pub fn new() -> Result<Self, Error>
Creates a new Application instance.
§Examples:
use b3_core::Application;
let app = Application::new().unwrap();
Sourcepub fn run(self, handler: impl EventHandler + 'static)
pub fn run(self, handler: impl EventHandler + 'static)
Trait Implementations§
Source§impl ContextOwner for Application
impl ContextOwner for Application
Auto Trait Implementations§
impl Freeze for Application
impl !RefUnwindSafe for Application
impl !Send for Application
impl !Sync for Application
impl Unpin for Application
impl !UnwindSafe for Application
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more