Skip to main content

NoopServiceBridge

Struct NoopServiceBridge 

Source
pub struct NoopServiceBridge;
Expand description

A no-op implementation of the service bridge for testing

Trait Implementations§

Source§

impl PluginServiceBridge for NoopServiceBridge

Source§

fn as_any(&self) -> &dyn Any

Support downcasting for tests
Source§

fn translate( &self, _plugin_name: &str, key: &str, _args: &HashMap<String, String>, ) -> String

Translate a string for a plugin
Source§

fn current_locale(&self) -> String

Get the current locale
Source§

fn set_js_execution_state(&self, _state: String)

Update the current JavaScript execution state (for debugging/signal handlers)
Source§

fn clear_js_execution_state(&self)

Clear the JavaScript execution state
Source§

fn get_theme_schema(&self) -> Value

Get the JSON schema for themes
Source§

fn get_builtin_themes(&self) -> Value

Get a list of builtin theme names
Source§

fn register_plugin_strings( &self, _plugin_name: &str, _strings: HashMap<String, HashMap<String, String>>, )

Register custom i18n strings for a plugin
Source§

fn unregister_plugin_strings(&self, _plugin_name: &str)

Unregister custom i18n strings for a plugin
Source§

fn register_command(&self, _command: Command)

Register a plugin command
Source§

fn unregister_command(&self, _name: &str)

Unregister a command by name
Source§

fn unregister_commands_by_prefix(&self, _prefix: &str)

Unregister all commands with a given prefix
Source§

fn unregister_commands_by_plugin(&self, _plugin_name: &str)

Unregister all commands registered by a specific plugin
Source§

fn plugins_dir(&self) -> PathBuf

Get the plugins directory path
Source§

fn config_dir(&self) -> PathBuf

Get the config directory path
Source§

fn get_theme_data(&self, _name: &str) -> Option<Value>

Get theme data (JSON) by name from the in-memory cache.
Source§

fn save_theme_file(&self, _name: &str, _content: &str) -> Result<String, String>

Save a theme file to the user themes directory. Returns the path where the file was written.
Source§

fn theme_file_exists(&self, _name: &str) -> bool

Check if a user theme file exists (for overwrite confirmation).

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.