Struct LaunchArgs
pub struct LaunchArgs {Show 15 fields
pub shots: Option<PathBuf>,
pub shots_dir: Option<PathBuf>,
pub responsive_matrix: Option<PathBuf>,
pub viewport: Option<(u32, u32)>,
pub scenario: Option<String>,
pub headless: Option<Spec>,
pub native_audit: bool,
pub pseudo_locale: bool,
pub text_scale: Option<f32>,
pub theme: Option<String>,
pub window: WindowAppearance,
pub history: bool,
pub search: Option<String>,
pub device_scale: Option<u32>,
pub distinct_letters: Option<bool>,
/* private fields */
}Expand description
Parsed common launch arguments. Extra flags are retained for an app’s
screenshot factory after being explicitly allow-listed by LaunchSpec.
Fields§
§shots: Option<PathBuf>§shots_dir: Option<PathBuf>--shots-dir DIR: one capture of every declared scenario, written to
DIR/NN-name.png in declaration order.
responsive_matrix: Option<PathBuf>§viewport: Option<(u32, u32)>§scenario: Option<String>§headless: Option<Spec>§native_audit: boolLay out the production root and print its Tilo-native certification.
pseudo_locale: bool§text_scale: Option<f32>§theme: Option<String>--theme NAME: the shipped theme a capture renders in
(Theme::named), over TILO_SHOTS_THEME.
window: WindowAppearance--workspace-hue DEGREES and --your-colour NAME: what the shell
would tell the captured window about where and for whom it is shown
(crate::theme::WindowAppearance). Without them a capture is what
a window without a shell shows: neutral, in the default colour.
history: bool--history: a capture shows History open, where the app has
History.
search: Option<String>--search QUERY: a capture shows this window’s search open with
QUERY typed, as the app’s search launcher opens it.
device_scale: Option<u32>--device-scale N: a capture is drawn at N device pixels per
logical pixel (1 to MAX_SHOT_DEVICE_SCALE), as a HiDPI display
draws the same window.
distinct_letters: Option<bool>--distinct-letters on|off: a capture renders with “Always
distinguish similar letters” on or off, whatever the theme’s face
would choose.
Implementations§
§impl LaunchArgs
impl LaunchArgs
pub fn component() -> LaunchArgs
pub fn component() -> LaunchArgs
The arguments of a component mounted by an in-process host: no screenshot, headless or audit mode and no app-specific arguments.
pub fn has(&self, flag: &str) -> bool
pub fn with_flag(self, flag: &str) -> LaunchArgs
pub fn with_flag(self, flag: &str) -> LaunchArgs
These arguments naming the app’s switch flag too (--private), as
a command line does: what a host or a test launches with.
pub fn value(&self, option: &str) -> Option<&str>
pub fn value(&self, option: &str) -> Option<&str>
Value supplied for an app-specific option allow-listed by the launch specification.
pub fn positionals(&self) -> &[String]
pub fn positionals(&self) -> &[String]
Positional launch arguments accepted by the specification, in order.
pub fn from_env(options: &[&str]) -> Result<LaunchArgs, LaunchError>
pub fn from_env(options: &[&str]) -> Result<LaunchArgs, LaunchError>
Trait Implementations§
§impl Clone for LaunchArgs
impl Clone for LaunchArgs
§fn clone(&self) -> LaunchArgs
fn clone(&self) -> LaunchArgs
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for LaunchArgs
impl Debug for LaunchArgs
§impl Default for LaunchArgs
impl Default for LaunchArgs
§fn default() -> LaunchArgs
fn default() -> LaunchArgs
Auto Trait Implementations§
impl Freeze for LaunchArgs
impl RefUnwindSafe for LaunchArgs
impl Send for LaunchArgs
impl Sync for LaunchArgs
impl Unpin for LaunchArgs
impl UnsafeUnpin for LaunchArgs
impl UnwindSafe for LaunchArgs
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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>
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>
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)
&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)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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