pub struct CallOptions {
pub client_id: Option<String>,
pub timeout: Option<Duration>,
pub window: Option<String>,
}Expand description
单次调用的可选参数。
Fields§
§client_id: Option<String>前端生成的调用 id,用于 Bridge::cancel。
以 (窗口标签, client_id) 为键,因此不同窗口可以使用相同 id,且一个 webview 只能取消
自己发起的调用;同一窗口内仍在进行的 id 不能重复使用。
timeout: Option<Duration>本次调用的超时时间;为 None 时使用默认超时,指定值最多为默认超时的 MAX_TIMEOUT_FACTOR 倍。
window: Option<String>发起调用的 webview 标签,会随 request 帧传给 Python(Command.window)。
Trait Implementations§
Source§impl Clone for CallOptions
impl Clone for CallOptions
Source§impl Debug for CallOptions
impl Debug for CallOptions
Auto Trait Implementations§
impl Forget for CallOptions
impl Freeze for CallOptions
impl Move for CallOptions
impl RefUnwindSafe for CallOptions
impl Send for CallOptions
impl Sync for CallOptions
impl Unpin for CallOptions
impl UnsafeUnpin for CallOptions
impl UnwindSafe for CallOptions
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