pub struct Engine { /* private fields */ }Implementations§
Source§impl Engine
impl Engine
Sourcepub fn start(
config: &Config,
paths: &Paths,
connect: Connector,
) -> (Engine, Receiver<Event>)
pub fn start( config: &Config, paths: &Paths, connect: Connector, ) -> (Engine, Receiver<Event>)
Spawns a sync thread per account.
Sourcepub fn apply_config(&mut self, config: &Config)
pub fn apply_config(&mut self, config: &Config)
Signals the threads of removed and changed accounts, starts new ones, and leaves the rest; never waits. A changed
account starts again from start_ready once its old thread ended.
Sourcepub fn start_ready(&mut self) -> bool
pub fn start_ready(&mut self) -> bool
Starts each configured account that has no thread and no old one still ending; true once every one runs.
pub fn accounts(&self) -> Vec<String>
Sourcepub fn is_restarting(&self, account: &str) -> bool
pub fn is_restarting(&self, account: &str) -> bool
Whether the account is configured but has no thread yet, as while its old thread ends after a config change.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Engine
impl !UnwindSafe for Engine
impl Freeze for Engine
impl Send for Engine
impl Sync for Engine
impl Unpin for Engine
impl UnsafeUnpin for Engine
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