#[non_exhaustive]pub struct BoardRegistration {Show 17 fields
pub id: &'static str,
pub title: Cow<'static, str>,
pub description: Cow<'static, str>,
pub icon: Option<&'static str>,
pub help: &'static str,
pub help_images: &'static [HelpImage],
pub searchable: bool,
pub create: Arc<dyn Fn(&mut Window, &mut App) -> DashboardHandle + Send + Sync>,
pub tools: ToolProvider,
pub settings: BoardSettings,
pub fields: Option<Arc<dyn Fn() -> Option<BoardFields> + Send + Sync>>,
pub settings_editor: Option<SettingsEditorFactory>,
pub start_background: fn(&mut App),
pub stop_background: fn(&mut App),
pub retain_when_disabled: bool,
pub configuration: Option<BoardConfiguration>,
pub contracts: BoardContracts,
/* private fields */
}Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.id: &'static str§title: Cow<'static, str>§description: Cow<'static, str>§icon: Option<&'static str>The board’s monochrome switcher SVG, also used by Settings by default.
help: &'static strThe board’s compiled-in Markdown help, empty when it has none.
help_images: &'static [HelpImage]§searchable: bool§create: Arc<dyn Fn(&mut Window, &mut App) -> DashboardHandle + Send + Sync>§tools: ToolProviderThe board’s agent tools; callable without GPUI.
settings: BoardSettingsStatic settings metadata captured without constructing the board.
fields: Option<Arc<dyn Fn() -> Option<BoardFields> + Send + Sync>>Settings the board declares at run time, such as from a manifest.
settings_editor: Option<SettingsEditorFactory>§start_background: fn(&mut App)§stop_background: fn(&mut App)§retain_when_disabled: boolSettings hides the board’s view instead of dropping it when it
disables the board: see Dashboard::RETAIN_WHEN_DISABLED.
configuration: Option<BoardConfiguration>§contracts: BoardContractsThe board’s contract declarations, read without creating the board.
Implementations§
Source§impl BoardRegistration
impl BoardRegistration
Sourcepub fn with_configuration<T: PartialEq + Send + Sync + 'static>(
self,
value: T,
) -> Self
pub fn with_configuration<T: PartialEq + Send + Sync + 'static>( self, value: T, ) -> Self
Captures configured inputs so unchanged instances survive live reloads.
Source§impl BoardRegistration
impl BoardRegistration
Sourcepub fn configured<D: Dashboard>(
id: &str,
title: &str,
description: &str,
create: impl Fn(&mut Window, &mut App) -> DashboardHandle + Send + Sync + 'static,
) -> Self
pub fn configured<D: Dashboard>( id: &str, title: &str, description: &str, create: impl Fn(&mut Window, &mut App) -> DashboardHandle + Send + Sync + 'static, ) -> Self
One instance of board type D that the config file defines, such as
a web board. Instances have no agent tools, search, features or
background work of their own, so several can share one type.
Source§impl BoardRegistration
impl BoardRegistration
Sourcepub fn with_field_source(
self,
source: impl Fn() -> Option<BoardFields> + Send + Sync + 'static,
) -> Self
pub fn with_field_source( self, source: impl Fn() -> Option<BoardFields> + Send + Sync + 'static, ) -> Self
Read current manifest metadata each time Settings opens.
Source§impl BoardRegistration
impl BoardRegistration
pub fn new<D: Dashboard>() -> Self
pub fn description(self, description: &'static str) -> Self
Sourcepub fn with_default_order(self, order: usize) -> Self
pub fn with_default_order(self, order: usize) -> Self
The position used when no personal Space order has been saved.
pub fn artwork(&self) -> BoardArtwork
pub fn connection_settings(&self) -> ConnectionSettings
pub fn doc(&self) -> Option<BoardDoc>
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for BoardRegistration
impl !UnwindSafe for BoardRegistration
impl Forget for BoardRegistration
impl Freeze for BoardRegistrationwhere
&'static str: Freeze,
String: Freeze,
&'static [HelpImage]: Freeze,
*const ArcInner<dyn Fn(&mut Window, &mut App) -> DashboardHandle + Sync + Send> is !null: Freeze,
PhantomData<ArcInner<dyn Fn(&mut Window, &mut App) -> DashboardHandle + Sync + Send>>: Freeze,
&'static [u8]: Freeze,
&'static [SettingsSection]: Freeze,
&'static [FeatureSpec]: Freeze,
&'static [&'static str]: Freeze,
*const ArcInner<dyn Fn() -> Option<BoardFields> + Sync + Send> is !null: Freeze,
PhantomData<ArcInner<dyn Fn() -> Option<BoardFields> + Sync + Send>>: Freeze,
*const ArcInner<dyn Any + Sync + Send> is !null: Freeze,
PhantomData<ArcInner<dyn Any + Sync + Send>>: Freeze,
&'static [(&'static str, &'static [u8])]: Freeze,
&'static [ConnectionField]: Freeze,
&'static [Declaration]: Freeze,
impl Move for BoardRegistration
impl Send for BoardRegistrationwhere
&'static str: Send,
String: Send,
&'static [HelpImage]: Send,
Arc<dyn Fn(&mut Window, &mut App) -> DashboardHandle + Sync + Send>: Send,
&'static [u8]: Send,
&'static [SettingsSection]: Send,
&'static [FeatureSpec]: Send,
&'static [&'static str]: Send,
Arc<dyn Fn() -> Option<BoardFields> + Sync + Send>: Send,
Arc<dyn Any + Sync + Send>: Send,
&'static [(&'static str, &'static [u8])]: Send,
&'static [ConnectionField]: Send,
&'static [Declaration]: Send,
impl Sync for BoardRegistration
impl Unpin for BoardRegistrationwhere
&'static str: Unpin,
String: Unpin,
&'static [HelpImage]: Unpin,
Arc<dyn Fn(&mut Window, &mut App) -> DashboardHandle + Sync + Send>: Unpin,
&'static [u8]: Unpin,
&'static [SettingsSection]: Unpin,
&'static [FeatureSpec]: Unpin,
&'static [&'static str]: Unpin,
Arc<dyn Fn() -> Option<BoardFields> + Sync + Send>: Unpin,
Arc<dyn Any + Sync + Send>: Unpin,
&'static [(&'static str, &'static [u8])]: Unpin,
&'static [ConnectionField]: Unpin,
&'static [Declaration]: Unpin,
impl UnsafeUnpin for BoardRegistrationwhere
&'static str: UnsafeUnpin,
String: UnsafeUnpin,
&'static [HelpImage]: UnsafeUnpin,
*const ArcInner<dyn Fn(&mut Window, &mut App) -> DashboardHandle + Sync + Send> is !null: UnsafeUnpin,
PhantomData<ArcInner<dyn Fn(&mut Window, &mut App) -> DashboardHandle + Sync + Send>>: UnsafeUnpin,
&'static [u8]: UnsafeUnpin,
&'static [SettingsSection]: UnsafeUnpin,
&'static [FeatureSpec]: UnsafeUnpin,
&'static [&'static str]: UnsafeUnpin,
*const ArcInner<dyn Fn() -> Option<BoardFields> + Sync + Send> is !null: UnsafeUnpin,
PhantomData<ArcInner<dyn Fn() -> Option<BoardFields> + Sync + Send>>: UnsafeUnpin,
*const ArcInner<dyn Any + Sync + Send> is !null: UnsafeUnpin,
PhantomData<ArcInner<dyn Any + Sync + Send>>: UnsafeUnpin,
&'static [(&'static str, &'static [u8])]: UnsafeUnpin,
&'static [ConnectionField]: UnsafeUnpin,
&'static [Declaration]: 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> 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
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