pub struct AppOptions { /* private fields */ }Expand description
Model set, product details and opening a host starts the app with.
Implementations§
Source§impl AppOptions
impl AppOptions
Sourcepub fn new(
models: ModelSet,
product: impl Into<String>,
host: BuildInfo,
) -> Self
pub fn new( models: ModelSet, product: impl Into<String>, host: BuildInfo, ) -> Self
Returns options that open models under the name product.
product is the window title and, on native targets, the folder eframe stores the app’s state in, with - for
each character a folder name cannot contain and henad-app for a name that ends up empty. host is the
build recorded as the host in each sweep’s manifest, in the run details and in the About window. The app opens
on the first model of models that runs on the device, with Henad’s icon, no links, no licence and no command
line.
Sourcepub fn icon_png(self, png: &'static [u8]) -> Self
pub fn icon_png(self, png: &'static [u8]) -> Self
Sets the window icon and the About window’s image, as the bytes of a PNG file.
Sourcepub fn source_url(self, url: impl Into<String>) -> Self
pub fn source_url(self, url: impl Into<String>) -> Self
Sets the link to the product’s source code, shown in the About menu and the About window.
Sourcepub fn documentation_url(self, url: impl Into<String>) -> Self
pub fn documentation_url(self, url: impl Into<String>) -> Self
Sets the link to the product’s documentation, shown in the About menu and the About window.
Sourcepub fn license(self, license: impl Into<String>) -> Self
pub fn license(self, license: impl Into<String>) -> Self
Sets the licence shown in the About window, such as MIT OR Apache-2.0.
Sourcepub fn cli_command(self, command: impl Into<String>) -> Self
pub fn cli_command(self, command: impl Into<String>) -> Self
Sets the command line the Copy command writes and the Sweep tab’s advice refers to, as one program name such as
henad-cli. Without one the button is hidden.
Note that the Copy command quotes the name as one shell word. A name with a space, such as cargo run --, is
written as a single quoted word.
Sourcepub fn opening(self, opening: AppOpening) -> Self
pub fn opening(self, opening: AppOpening) -> Self
Sets the opening the app starts on instead of the first model of the set.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for AppOptions
impl !UnwindSafe for AppOptions
impl Freeze for AppOptions
impl Send for AppOptions
impl Sync for AppOptions
impl Unpin for AppOptions
impl UnsafeUnpin for AppOptions
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
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.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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