pub const GITHUB_REPO: &str = "libobs-rs/libobs-builds";
#[derive(Debug, Clone)]
pub struct ObsBootstrapperOptions {
pub(crate) repository: String,
pub(crate) update: bool,
pub(crate) restart_after_update: bool,
}
impl ObsBootstrapperOptions {
pub fn new() -> Self {
ObsBootstrapperOptions {
repository: GITHUB_REPO.to_string(),
update: true,
restart_after_update: true,
}
}
pub fn set_repository(mut self, repository: &str) -> Self {
self.repository = repository.to_string();
self
}
pub fn get_repository(&self) -> &str {
&self.repository
}
pub fn set_update(mut self, update: bool) -> Self {
self.update = update;
self
}
pub fn set_no_restart(mut self) -> Self {
self.restart_after_update = false;
self
}
}
impl Default for ObsBootstrapperOptions {
fn default() -> Self {
ObsBootstrapperOptions::new()
}
}