pub struct RefreshOptions {
pub wait: WarmupWait,
pub timeout_ms: u64,
pub reset_connection: bool,
}Expand description
Options for PageHandle::refresh.
§Example
use stygian_browser::page::{RefreshOptions, WarmupWait};
let opts = RefreshOptions {
wait: WarmupWait::DomContentLoaded,
timeout_ms: 15_000,
reset_connection: true,
};
assert!(opts.reset_connection);Fields§
§wait: WarmupWaitWait strategy applied after the reload (default: DomContentLoaded).
timeout_ms: u64Reload timeout in milliseconds. Default: 30 000.
reset_connection: boolWhen true, re-navigates to the current URL rather than issuing a
browser-level reload. This signals to the calling code that a new TCP
connection is desired while cookies and storage are retained in the
browser process. Default: false.
Implementations§
Source§impl RefreshOptions
impl RefreshOptions
Sourcepub const fn default_timeout_ms() -> u64
pub const fn default_timeout_ms() -> u64
Returns the default reload timeout (30 000 ms).
Trait Implementations§
Source§impl Clone for RefreshOptions
impl Clone for RefreshOptions
Source§fn clone(&self) -> RefreshOptions
fn clone(&self) -> RefreshOptions
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RefreshOptions
impl Debug for RefreshOptions
Source§impl Default for RefreshOptions
impl Default for RefreshOptions
Source§impl<'de> Deserialize<'de> for RefreshOptions
impl<'de> Deserialize<'de> for RefreshOptions
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for RefreshOptions
impl RefUnwindSafe for RefreshOptions
impl Send for RefreshOptions
impl Sync for RefreshOptions
impl Unpin for RefreshOptions
impl UnsafeUnpin for RefreshOptions
impl UnwindSafe for RefreshOptions
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