pub struct SupervisorConfig {
pub process: ProcessConfig,
pub handshake_timeout: Duration,
pub invoke_timeout: Duration,
pub shutdown_timeout: Duration,
pub restart_on_crash: bool,
pub max_frame_size: usize,
pub app_name: String,
pub app_version: String,
}Expand description
Supervisor 的完整配置,由插件 Builder 与 tauri.conf.json 合并得到。
Fields§
§process: ProcessConfig子进程启动参数。
handshake_timeout: Duration等待 hello 的时长,同时也是调用等待运行时就绪的最长时间。
invoke_timeout: Duration每次调用的默认超时。
shutdown_timeout: Duration通过 shutdown 帧交给 Python 的关闭预算;超过该时长再加 1 秒宽限后进程会被杀死。
restart_on_crash: bool进程意外退出后是否重启。采用指数退避(从 1 秒开始翻倍,最多 30 秒,进程稳定运行 30 秒后
重置)。重启后的进程若握手失败,则停止自动重启,状态变为 Status::Failed。
max_frame_size: usize单帧大小上限,同时作用于收发两个方向。
app_name: String通过 ready 帧告知 Python 的应用名称。
app_version: String通过 ready 帧告知 Python 的应用版本。
Trait Implementations§
Source§impl Clone for SupervisorConfig
impl Clone for SupervisorConfig
Auto Trait Implementations§
impl Forget for SupervisorConfig
impl Freeze for SupervisorConfig
impl Move for SupervisorConfig
impl RefUnwindSafe for SupervisorConfig
impl Send for SupervisorConfig
impl Sync for SupervisorConfig
impl Unpin for SupervisorConfig
impl UnsafeUnpin for SupervisorConfig
impl UnwindSafe for SupervisorConfig
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