pub struct ShellSpec {Show 15 fields
pub app_name: SharedString,
pub registry: Registry,
pub open: Option<OpenSpec>,
pub file_menu: Vec<MenuItem>,
pub app_menu: Vec<MenuItem>,
pub edit_menu: Vec<MenuItem>,
pub view_menu: Vec<MenuItem>,
pub help_menu: Vec<MenuItem>,
pub workspaces: Vec<WorkspaceSpec>,
pub settings: Vec<SettingsSection>,
pub layout_toggles: Vec<SharedString>,
pub remote: Option<RemoteSpec>,
pub people: bool,
pub meters: bool,
pub status_items: Option<StatusItems>,
}Expand description
What an app hands the frame.
Fields§
§app_name: SharedStringThe app’s name: its mark at the left of the title bar, and the window’s.
registry: RegistryIts commands.
open: Option<OpenSpec>What File → Open… opens; no Open… item without it.
File’s entries after Open… (Open recent, Save, Export…; Settings and Quit are added).
Older name of ShellSpec::file_menu: its entries follow file_menu’s.
Edit’s entries (Undo, Redo, Copy…); no Edit menu when empty.
View’s entries (the layout toggles and the theme are added).
The Help menu’s entries (the search is added).
workspaces: Vec<WorkspaceSpec>Its workspaces, in the switcher’s order.
settings: Vec<SettingsSection>Its Settings sections (after the built-in Appearance).
layout_toggles: Vec<SharedString>Commands shown as icon buttons at the right of the title bar (side panels…).
remote: Option<RemoteSpec>Where the app runs.
people: boolWhether the app records who works (crate::people): the title bar’s person button and a
People section at the end of Settings. The app crate::people::loads the people first.
meters: boolWhether the status bar shows this computer’s load (off in tests).
status_items: Option<StatusItems>The app’s own readings in the status bar, before the jobs (the frame’s numbers, a device).
Implementations§
Source§impl ShellSpec
impl ShellSpec
Sourcepub fn new(
app_name: impl Into<SharedString>,
registry: Registry,
workspaces: Vec<WorkspaceSpec>,
) -> Self
pub fn new( app_name: impl Into<SharedString>, registry: Registry, workspaces: Vec<WorkspaceSpec>, ) -> Self
An app named app_name with registry and workspaces, the rest empty.
Auto Trait Implementations§
impl !RefUnwindSafe for ShellSpec
impl !Send for ShellSpec
impl !Sync for ShellSpec
impl !UnwindSafe for ShellSpec
impl Forget for ShellSpec
impl Freeze for ShellSpecwhere
&'static str: Freeze,
*const ArcInner<str> is !null: Freeze,
PhantomData<ArcInner<str>>: Freeze,
*const RcInner<RefCell<Vec<CommandSpec>>> is !null: Freeze,
PhantomData<RcInner<RefCell<Vec<CommandSpec>>>>: Freeze,
*const RcInner<RefCell<Vec<(SharedString, Rc<dyn Fn(&App) -> Vec<MenuItem>>)>>> is !null: Freeze,
PhantomData<RcInner<RefCell<Vec<(SharedString, Rc<dyn Fn(&App) -> Vec<MenuItem>>)>>>>: Freeze,
*const u8 is !null: Freeze,
PhantomData<FileKind>: Freeze,
PhantomData<u8>: Freeze,
*const RcInner<dyn Fn(&App) -> Vec<PathBuf>> is !null: Freeze,
PhantomData<RcInner<dyn Fn(&App) -> Vec<PathBuf>>>: Freeze,
*const RcInner<dyn Fn(PathBuf, &mut Window, &mut App)> is !null: Freeze,
PhantomData<RcInner<dyn Fn(PathBuf, &mut Window, &mut App)>>: Freeze,
PhantomData<MenuItem>: Freeze,
PhantomData<WorkspaceSpec>: Freeze,
PhantomData<SettingsSection>: Freeze,
PhantomData<SharedString>: Freeze,
*const RcInner<dyn Fn(&mut Window, &mut App) -> AnyElement> is !null: Freeze,
PhantomData<RcInner<dyn Fn(&mut Window, &mut App) -> AnyElement>>: Freeze,
impl Move for ShellSpec
impl Unpin for ShellSpecwhere
&'static str: Unpin,
Arc<str>: Unpin,
Rc<RefCell<Vec<CommandSpec>>>: Unpin,
Rc<RefCell<Vec<(SharedString, Rc<dyn Fn(&App) -> Vec<MenuItem>>)>>>: Unpin,
*const u8 is !null: Unpin,
Rc<dyn Fn(&App) -> Vec<PathBuf>>: Unpin,
Rc<dyn Fn(PathBuf, &mut Window, &mut App)>: Unpin,
NonZero<u32>: Unpin,
*const (): Unpin,
*const ArcInner<RwLock<RawRwLock, EntityRefCounts>> is !null: Unpin,
Rc<dyn Fn(&App) -> usize>: Unpin,
Rc<dyn Fn(&mut Window, &mut App) -> AnyElement>: Unpin,
impl UnsafeUnpin for ShellSpecwhere
&'static str: UnsafeUnpin,
*const ArcInner<str> is !null: UnsafeUnpin,
PhantomData<ArcInner<str>>: UnsafeUnpin,
*const RcInner<RefCell<Vec<CommandSpec>>> is !null: UnsafeUnpin,
PhantomData<RcInner<RefCell<Vec<CommandSpec>>>>: UnsafeUnpin,
*const RcInner<RefCell<Vec<(SharedString, Rc<dyn Fn(&App) -> Vec<MenuItem>>)>>> is !null: UnsafeUnpin,
PhantomData<RcInner<RefCell<Vec<(SharedString, Rc<dyn Fn(&App) -> Vec<MenuItem>>)>>>>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<FileKind>: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
*const RcInner<dyn Fn(&App) -> Vec<PathBuf>> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn Fn(&App) -> Vec<PathBuf>>>: UnsafeUnpin,
*const RcInner<dyn Fn(PathBuf, &mut Window, &mut App)> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn Fn(PathBuf, &mut Window, &mut App)>>: UnsafeUnpin,
PhantomData<MenuItem>: UnsafeUnpin,
PhantomData<WorkspaceSpec>: UnsafeUnpin,
PhantomData<SettingsSection>: UnsafeUnpin,
PhantomData<SharedString>: UnsafeUnpin,
*const RcInner<dyn Fn(&mut Window, &mut App) -> AnyElement> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn Fn(&mut Window, &mut App) -> AnyElement>>: UnsafeUnpin,
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