pub struct Santui { /* private fields */ }Implementations§
Source§impl Santui
impl Santui
Sourcepub fn set_data_dir(&mut self, dir: PathBuf)
pub fn set_data_dir(&mut self, dir: PathBuf)
Set the santui data directory (e.g. ~/.santui).
Called from main.rs before run().
Sourcepub fn set_plugin_factory(&mut self, factory: PluginFactory)
pub fn set_plugin_factory(&mut self, factory: PluginFactory)
Set the plugin factory (called from main.rs before run()). Used by PluginManager for hot-reload and on-demand plugin creation.
Sourcepub fn register_default_plugin(&mut self, id: &str, name: &str, path: &Path)
pub fn register_default_plugin(&mut self, id: &str, name: &str, path: &Path)
Register a default plugin (bundled with santui, e.g. the registry plugin).
The plugin is created via the factory and registered without initialising.
It will be initialised during init_all in run().
Source§impl Santui
impl Santui
pub fn new() -> Self
Sourcepub fn set_tick_rate(&mut self, duration: Duration)
pub fn set_tick_rate(&mut self, duration: Duration)
Set the main loop tick rate (default 100ms). Lower values = smoother animation but more CPU.
pub fn set_auth(&mut self, auth: Arc<dyn AuthHandle>)
Sourcepub fn set_config_dir(&mut self, dir: PathBuf)
pub fn set_config_dir(&mut self, dir: PathBuf)
Set the config directory and load (or create) config.toml.
Call before run().
Sourcepub fn current_theme_name(&self) -> &str
pub fn current_theme_name(&self) -> &str
Get the currently selected theme name.
pub fn register(&mut self, plugin: Box<dyn Plugin + Send>)
pub fn run(&mut self) -> Result<(), Box<dyn Error>>
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Santui
impl !Sync for Santui
impl !UnwindSafe for Santui
impl Freeze for Santui
impl Send for Santui
impl Unpin for Santui
impl UnsafeUnpin for Santui
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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