use tauri::Runtime;
pub fn default_custom_scheme_url(auth_protocol: &str) -> String {
if cfg!(windows) {
format!("http://{}.localhost", auth_protocol)
} else {
format!("{}://localhost", auth_protocol)
}
}
pub struct Builder;
impl Builder {
#[must_use]
pub fn new() -> Self {
Self
}
#[must_use]
pub fn custom_scheme_url<F>(self, _f: F) -> Self
where
F: Fn(&str) -> String + Send + Sync + 'static,
{
self
}
#[must_use]
pub fn build<R: Runtime>(self) -> tauri::plugin::TauriPlugin<R> {
tauri::plugin::Builder::new("devtools-app").build()
}
}
#[must_use]
pub fn init<R: Runtime>() -> tauri::plugin::TauriPlugin<R> {
Builder::new().build()
}