pub struct Desktop {
pub version: &'static str,
pub archives: &'static [Archive],
pub install_dir: &'static str,
pub program: &'static str,
pub flags: &'static [&'static str],
pub packages: &'static [&'static str],
pub image_mib: u64,
}Expand description
A harness that opens a window: where its application comes from, what the image needs beside the base image to run it, and how the window is started.
The application is never carried inside a QCode image. Its terms permit running it, not redistributing it, so the image is built on the person’s own machine and fetches the archive from the maker’s address at install time, exactly as a command-line harness is installed from its own registry.
Fields§
§version: &'static strThe version this record was read from and checked against.
archives: &'static [Archive]The maker’s archives of that version, one for each processor the image may be built on.
The image picks one while it is built, by the machine it is built on, and not QCode by the machine it was compiled for: the engine may build for another processor than QCode’s own.
install_dir: &'static strWhere the archive unpacks to in the image, the one directory inside it stripped away.
program: &'static strThe program that opens the window, by its name under Desktop::install_dir.
The archive’s own launcher script is not used: it runs the real program through sh, and
a container whose first process is that shell never passes the stop signal on, so every
stop costs the engine’s ten-second timeout and a kill.
flags: &'static [&'static str]The arguments the window is always opened with.
packages: &'static [&'static str]The Debian packages the application needs beside what the base image brings.
image_mib: u64How much room the built image takes, in whole mebibytes, as it was measured on top of
qcode/base, which is what the recipe builds on. The person is told this before they
ask for the image: a desktop image is an order of magnitude larger than a command-line
harness’s.
Measure it the way the recipe builds it, not on a bare Debian: the first number here was
taken on debian:trixie-slim during the trial and understated the image by 900 MiB,
which is a promise broken before the download even starts. The live test
the_image_builds_from_the_makers_archive_and_carries_the_application_and_its_settings
prints the built size, so a re-measure is one run away.
Implementations§
Source§impl Desktop
impl Desktop
Sourcepub fn command(&self) -> String
pub fn command(&self) -> String
The program that opens the window, as an absolute path in the image.
Sourcepub fn command_line(&self, workspace: &str) -> Vec<String>
pub fn command_line(&self, workspace: &str) -> Vec<String>
The whole line that opens the window on the workspace at workspace: the program, the
arguments it always takes, and the folder to open.
Trait Implementations§
impl Copy for Desktop
impl Eq for Desktop
impl StructuralPartialEq for Desktop
Auto Trait Implementations§
impl Freeze for Desktop
impl RefUnwindSafe for Desktop
impl Send for Desktop
impl Sync for Desktop
impl Unpin for Desktop
impl UnsafeUnpin for Desktop
impl UnwindSafe for Desktop
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,
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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