pub struct SessionApp<A: Stores> {
pub config: HostConfig,
pub args: Args,
/* private fields */
}Fields§
§config: HostConfig§args: ArgsImplementations§
Source§impl<A: Stores> SessionApp<A>
impl<A: Stores> SessionApp<A>
pub fn new(config: HostConfig) -> Self
pub fn with_args(config: HostConfig, args: Args) -> Self
pub fn apply_args(&mut self)
pub fn pass(self, pass: Box<dyn FramePass>) -> Self
pub fn on_frame(self, hook: impl FnMut(&mut FrameHook<'_, A>) + 'static) -> Self
pub fn on_input(self, hook: impl FnMut(&InputHook<'_, A>) + 'static) -> Self
pub fn recover_on_fault(self, action: ActionId) -> Self
pub fn sender(&self) -> CommandSender<A>
pub fn boundary( &mut self, session: &mut Session<A>, input: Input, ) -> Result<Growth, HostError>
pub fn command( self, name: &'static str, help: &'static str, handler: impl FnMut(&[&str], &mut Submit<A>, &mut ConsoleWriter) -> Result<()> + 'static, ) -> Self
pub fn target_fps(self, fps: f32) -> Self
pub fn vsync(self, enabled: bool) -> Self
Sourcepub fn background(self, rgb: [f32; 3]) -> Self
pub fn background(self, rgb: [f32; 3]) -> Self
Linear light; the present clear shows wherever no Background pass paints.
pub fn redraw(self, policy: Redraw) -> Self
pub fn capture( self, request: CaptureRequest, ) -> Result<Self, CaptureUnavailable>
pub fn debug_layer(self, enabled: bool) -> Self
pub fn console_mut(&mut self) -> &mut SessionConsole<A>
Auto Trait Implementations§
impl<A> Freeze for SessionApp<A>
impl<A> !RefUnwindSafe for SessionApp<A>
impl<A> !Send for SessionApp<A>
impl<A> !Sync for SessionApp<A>
impl<A> Unpin for SessionApp<A>
impl<A> UnsafeUnpin for SessionApp<A>
impl<A> !UnwindSafe for SessionApp<A>
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.