[−][src]Struct artifice_installer::installation::Installer
this struct is used for the operation of the installation process
Implementations
impl<E: Error + Send + Sync, DB: Database<E> + Send + Sync> Installer<E, DB>
[src]
pub fn new(
install_src: InstallationSrc,
database: DB,
thread_count: u8,
task_duration: Duration
) -> Self
[src]
install_src: InstallationSrc,
database: DB,
thread_count: u8,
task_duration: Duration
) -> Self
Arguments
install_src: precompiled, versus compiled database: the installation destination, ideally will be passed into the callbacks of each task thread count: how many threads to run tasks on in parrellel (means tasks can't be sequential) task_duration how long should the task schedule wait before killing a task because it has hung
Example
//note if not in this location any attempt to start the network will fail, because that is the current place that the system will look for configs // perhaps in the future the configs will be set to load from an env var let database = ArtificeDB::create("/home/user/.artifice"); let mut installer = Installer::new(InstalllationSrc::NewCompiled, database, 5, Durattion::from_seconds(5000000)); let task = Task::new(0, "create_dirs", move |db| { //some code here to preform a task }); installer.add_task(task); installer.run();
pub fn config_src(self, config_src: ConfigSrc) -> Self
[src]
update the config src from generating new config to using existing configs
pub fn add_task(&mut self, task: Task<E, DB>)
[src]
adds a task to the task schedule
pub fn run(
self
) -> Result<(String, u16), ((String, u16), Box<dyn Error + Send + Sync>)>
[src]
self
) -> Result<(String, u16), ((String, u16), Box<dyn Error + Send + Sync>)>
used to run the constructed task schedule that performs each step needed for installation
Auto Trait Implementations
impl<E, DB> !RefUnwindSafe for Installer<E, DB>
impl<E, DB> Send for Installer<E, DB>
impl<E, DB> !Sync for Installer<E, DB>
impl<E, DB> Unpin for Installer<E, DB> where
DB: Unpin,
E: Unpin,
DB: Unpin,
E: Unpin,
impl<E, DB> !UnwindSafe for Installer<E, DB>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,