pub struct ScriptApplication { /* private fields */ }Implementations§
Source§impl ScriptApplication
impl ScriptApplication
pub const fn new(prepared: PreparedScriptView) -> Self
pub const fn window_size(self, width: f32, height: f32) -> Self
Control built-in runtime-error banners in standalone script windows.
Applications that disable them must provide another visible surface for
ScriptViewHandle::last_error.
Sourcepub const fn mirror_errors_to_stderr(self, mirror: bool) -> Self
pub const fn mirror_errors_to_stderr(self, mirror: bool) -> Self
Print each new failure of a script window to stderr, so an unattended
run fails loudly. On by default; see
ScriptViewConfig::mirror_errors_to_stderr.
Sourcepub const fn window_drag_areas(self, enabled: bool) -> Self
pub const fn window_drag_areas(self, enabled: bool) -> Self
Let window_drag_area() nodes in the main window’s view move the window,
for an application that hides the platform title bar through
Self::window_options and draws its own (TitleBar with
window_drag). See ScriptViewConfig::window_drag_areas.
Sourcepub fn window_options(
self,
configure: impl FnOnce(WindowOptions, &mut App) -> WindowOptions + 'static,
) -> Self
pub fn window_options( self, configure: impl FnOnce(WindowOptions, &mut App) -> WindowOptions + 'static, ) -> Self
Configure the trusted standalone window without exposing native window authority to Rhai. The callback receives the centered default options.
Sourcepub fn app_identity(
self,
identifier: impl Into<String>,
name: impl Into<String>,
) -> Self
pub fn app_identity( self, identifier: impl Into<String>, name: impl Into<String>, ) -> Self
The application’s identifier (reverse DNS, com.example.app) and
name, which Linux and Windows show on system notifications. macOS takes
both from the bundle’s Info.plist instead (see crate::system).
Auto Trait Implementations§
impl !Freeze for ScriptApplication
impl !RefUnwindSafe for ScriptApplication
impl !Send for ScriptApplication
impl !Sync for ScriptApplication
impl !UnwindSafe for ScriptApplication
impl Forget for ScriptApplication
impl Move for ScriptApplication
impl Unpin for ScriptApplication
impl UnsafeUnpin for ScriptApplication
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
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.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more