pub trait StatusBarProvider:
Environment
+ Send
+ Sync {
// Required methods
fn SetStatusBarEntry<'life0, 'async_trait>(
&'life0 self,
Entry: StatusBarEntryDTO,
) -> Pin<Box<dyn Future<Output = Result<(), CommonError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn DisposeStatusBarEntry<'life0, 'async_trait>(
&'life0 self,
EntryIdentifier: String,
) -> Pin<Box<dyn Future<Output = Result<(), CommonError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn SetStatusBarMessage<'life0, 'async_trait>(
&'life0 self,
MessageIdentifier: String,
Text: String,
) -> Pin<Box<dyn Future<Output = Result<(), CommonError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn DisposeStatusBarMessage<'life0, 'async_trait>(
&'life0 self,
MessageIdentifier: String,
) -> Pin<Box<dyn Future<Output = Result<(), CommonError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn ProvideTooltip<'life0, 'async_trait>(
&'life0 self,
EntryIdentifier: String,
) -> Pin<Box<dyn Future<Output = Result<Option<Value>, CommonError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
An abstract service contract for an environment component that can manage the state and rendering of status bar entries and temporary messages.
This trait is implemented by MountainEnvironment and defines the
operations that Cocoon can request from the host to manage the UI state of
the status bar.
Required Methods§
Sourcefn SetStatusBarEntry<'life0, 'async_trait>(
&'life0 self,
Entry: StatusBarEntryDTO,
) -> Pin<Box<dyn Future<Output = Result<(), CommonError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn SetStatusBarEntry<'life0, 'async_trait>(
&'life0 self,
Entry: StatusBarEntryDTO,
) -> Pin<Box<dyn Future<Output = Result<(), CommonError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Informs the host to create a new status bar entry or update an existing
one. The EntryIdentifier within the DTO is used to identify the
entry.
§Parameters
Entry: The DTO containing the complete state of the status bar item.
Sourcefn DisposeStatusBarEntry<'life0, 'async_trait>(
&'life0 self,
EntryIdentifier: String,
) -> Pin<Box<dyn Future<Output = Result<(), CommonError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn DisposeStatusBarEntry<'life0, 'async_trait>(
&'life0 self,
EntryIdentifier: String,
) -> Pin<Box<dyn Future<Output = Result<(), CommonError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Informs the host to dispose of (remove) a status bar entry from the UI.
§Parameters
EntryIdentifier: The unique identifier of the entry to remove.
Sourcefn SetStatusBarMessage<'life0, 'async_trait>(
&'life0 self,
MessageIdentifier: String,
Text: String,
) -> Pin<Box<dyn Future<Output = Result<(), CommonError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn SetStatusBarMessage<'life0, 'async_trait>(
&'life0 self,
MessageIdentifier: String,
Text: String,
) -> Pin<Box<dyn Future<Output = Result<(), CommonError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Shows a temporary message in the status bar. The message is identified by a unique ID so it can be disposed of later.
§Parameters
MessageIdentifier: A unique ID for this message instance.Text: The text content of the message.
Sourcefn DisposeStatusBarMessage<'life0, 'async_trait>(
&'life0 self,
MessageIdentifier: String,
) -> Pin<Box<dyn Future<Output = Result<(), CommonError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn DisposeStatusBarMessage<'life0, 'async_trait>(
&'life0 self,
MessageIdentifier: String,
) -> Pin<Box<dyn Future<Output = Result<(), CommonError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Disposes of a temporary status bar message.
§Parameters
MessageIdentifier: The unique ID of the message to remove.
Sourcefn ProvideTooltip<'life0, 'async_trait>(
&'life0 self,
EntryIdentifier: String,
) -> Pin<Box<dyn Future<Output = Result<Option<Value>, CommonError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn ProvideTooltip<'life0, 'async_trait>(
&'life0 self,
EntryIdentifier: String,
) -> Pin<Box<dyn Future<Output = Result<Option<Value>, CommonError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
This method is called by the host to the extension host (Cocoon)
when a dynamic tooltip needs to be resolved for a status bar item.
§Parameters
EntryIdentifier: The unique identifier of the entry for which to provide a tooltip.
§Returns
A Result containing an optional DTO for the tooltip (e.g.,
IMarkdownStringDTO).