pub struct SidecarLifecycle {
pub command: String,
pub settings_category: Option<String>,
pub display_name: Option<String>,
pub importance: i32,
}Expand description
Plugin-claimed lifecycle UX for a sidecar. See SidecarManifest::lifecycle.
The plugin chooses how its lifecycle commands and settings appear
to the user. Core uses display_name for the pill, status line,
and error messages; auto-registers <command> toggle/status as
addressable slash commands; injects a virtual toggle-key field
into settings_category (when given).
importance controls pill ordering when multiple sidecars are
loaded simultaneously: higher = leftmost. Defaults to 0. Cap at
-100..=100; values outside that range are clamped at parse time.
Fields§
§command: StringSlash-command name that owns this sidecar’s lifecycle.
Together with toggle/status subcommands forms e.g.
the plugin’s toggle command.
settings_category: Option<String>Settings category id (matches a settings.categories[].id in
the plugin manifest) that should host the virtual toggle-key
field. When None, no settings injection happens.
display_name: Option<String>Display name shown in the pill, status line, and /extensions
(e.g. “Sample”, “OCR”). Defaults to command when None.
importance: i32Pill-ordering hint (-100..=100, default 0). Higher = leftmost.
Implementations§
Source§impl SidecarLifecycle
impl SidecarLifecycle
Sourcepub fn effective_display_name(&self) -> &str
pub fn effective_display_name(&self) -> &str
Resolved display name: display_name if set, else command.
Trait Implementations§
Source§impl Clone for SidecarLifecycle
impl Clone for SidecarLifecycle
Source§fn clone(&self) -> SidecarLifecycle
fn clone(&self) -> SidecarLifecycle
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SidecarLifecycle
impl Debug for SidecarLifecycle
Source§impl<'de> Deserialize<'de> for SidecarLifecycle
impl<'de> Deserialize<'de> for SidecarLifecycle
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for SidecarLifecycle
impl PartialEq for SidecarLifecycle
impl Eq for SidecarLifecycle
impl StructuralPartialEq for SidecarLifecycle
Auto Trait Implementations§
impl Freeze for SidecarLifecycle
impl RefUnwindSafe for SidecarLifecycle
impl Send for SidecarLifecycle
impl Sync for SidecarLifecycle
impl Unpin for SidecarLifecycle
impl UnsafeUnpin for SidecarLifecycle
impl UnwindSafe for SidecarLifecycle
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§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.