pub enum WaitCondition {
Text,
TextGone,
Selector,
SelectorGone,
Url,
IpcIdle,
NetworkIdle,
Expression,
Event,
}Expand description
Condition to poll for in the wait_for tool.
Variants§
Text
Wait for text to appear in the page.
TextGone
Wait for text to disappear from the page.
Selector
Wait for a CSS selector to match an element.
SelectorGone
Wait for a CSS selector to stop matching.
Url
Wait for the URL to contain a substring.
IpcIdle
Wait for all IPC calls to complete.
NetworkIdle
Wait for all network requests to complete.
Expression
Poll a JavaScript expression until it is truthy (or equals expected).
The expression is evaluated in the webview each poll via the same engine
as eval_js, so it may await (e.g.
(await window.__TAURI_INTERNALS__.invoke('get_status')).running === false).
This is the level-triggered, race-free way to await a fire-and-forget
backend command that exposes a pollable status — no app changes required.
Event
Block until a named Tauri event fires on the app’s event bus.
Edge-triggered completion: evaluated server-side against Victauri’s
captured event bus, with a since_ms look-back so an event that fired in
the gap between invoke_command and this call is not missed. The app must
emit the event and Victauri must be configured to capture it via
VictauriBuilder::listen_events(&["..."]) (window-lifecycle events are
captured automatically).
Implementations§
Trait Implementations§
Source§impl Clone for WaitCondition
impl Clone for WaitCondition
Source§fn clone(&self) -> WaitCondition
fn clone(&self) -> WaitCondition
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for WaitCondition
Source§impl Debug for WaitCondition
impl Debug for WaitCondition
Source§impl<'de> Deserialize<'de> for WaitCondition
impl<'de> Deserialize<'de> for WaitCondition
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Display for WaitCondition
impl Display for WaitCondition
impl Eq for WaitCondition
Source§impl JsonSchema for WaitCondition
impl JsonSchema for WaitCondition
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl PartialEq for WaitCondition
impl PartialEq for WaitCondition
Source§fn eq(&self, other: &WaitCondition) -> bool
fn eq(&self, other: &WaitCondition) -> bool
self and other values to be equal, and is used by ==.