pub struct Member {
pub id: &'static str,
pub settings_id: &'static str,
pub title: &'static str,
pub package: &'static str,
pub command: &'static str,
}Expand description
One application of an ecosystem, as every other member needs to know it: a launcher that lists and opens it, a settings screen that shows whether it follows the shared preferences.
Only what every member needs is here; how a launcher draws a member (its icon, its words, its release status) stays in the launcher.
use qframe::storage::Ecosystem;
let ecosystem = Ecosystem::QUVYTA;
let desk = ecosystem.members().iter().find(|member| member.id == "desk").expect("qdesk is a member");
assert_eq!((desk.settings_id, desk.command), ("desktop", "qdesk"));
if let (Some(folder), Some(file)) = (ecosystem.config_dir(), ecosystem.app_file(desk.settings_id)) {
assert_eq!(file, folder.join("desktop.conf"));
}Fields§
§id: &'static strThe member’s lowercase name inside the ecosystem, such as code or desk: the name its
project goes by. Not always the id of its settings file.
settings_id: &'static strThe id its settings file goes under in the ecosystem’s folder, <settings_id>.conf: the
app the member itself gives Settings::load_member and
Ecosystem::preferences. qdesk’s is desktop, the showcase’s showcase and the
launcher’s launcher, since the ecosystem’s own id names the file every member shares.
title: &'static strThe member’s name as a user reads it, such as Code: the name under which its work is
kept, Ecosystem::workspace_dir.
package: &'static strThe package it is installed as, such as quvyta-code.
command: &'static strThe short command that starts it, such as qcode. The package name starts it too.
Trait Implementations§
impl Copy for Member
impl Eq for Member
impl StructuralPartialEq for Member
Auto Trait Implementations§
impl Freeze for Member
impl RefUnwindSafe for Member
impl Send for Member
impl Sync for Member
impl Unpin for Member
impl UnsafeUnpin for Member
impl UnwindSafe for Member
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<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