Skip to main content

Santui

Struct Santui 

Source
pub struct Santui { /* private fields */ }

Implementations§

Source§

impl Santui

Source

pub fn set_data_dir(&mut self, dir: PathBuf)

Set the santui data directory (e.g. ~/.santui). Called from main.rs before run().

Source

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.

Source

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

Source

pub fn new() -> Self

Source

pub fn set_tick_rate(&mut self, duration: Duration)

Set the main loop tick rate (default 100ms). Lower values = smoother animation but more CPU.

Source

pub fn set_auth(&mut self, auth: Arc<dyn AuthHandle>)

Source

pub fn set_config_dir(&mut self, dir: PathBuf)

Set the config directory and load (or create) config.toml. Call before run().

Source

pub fn current_theme_name(&self) -> &str

Get the currently selected theme name.

Source

pub fn register(&mut self, plugin: Box<dyn Plugin + Send>)

Source

pub fn run(&mut self) -> Result<(), Box<dyn Error>>

Trait Implementations§

Source§

impl Default for Santui

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

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> 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> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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.