#[non_exhaustive]pub struct BrowserWaitConfig {
pub confirmations: u64,
pub timeout_ms: u32,
pub poll_interval_ms: u32,
pub max_polls: u32,
}Expand description
Explicit browser transaction-wait limits. Milliseconds must be positive and fit a browser timer; polling attempts are independently bounded. No implicit defaults.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.confirmations: u64Required positive observed depth, including the containing block.
timeout_ms: u32Overall observable monotonic timeout, including RPCs and polling delays.
poll_interval_ms: u32Delay between incomplete observations, no longer than the timeout.
max_polls: u32At most 100,000 completed observations; zero is invalid.
Implementations§
Source§impl BrowserWaitConfig
impl BrowserWaitConfig
Sourcepub const fn new(
confirmations: u64,
timeout_ms: u32,
poll_interval_ms: u32,
max_polls: u32,
) -> Self
pub const fn new( confirmations: u64, timeout_ms: u32, poll_interval_ms: u32, max_polls: u32, ) -> Self
Every limit is required: there is deliberately no default.
Sourcepub const fn with_confirmations(self, confirmations: u64) -> Self
pub const fn with_confirmations(self, confirmations: u64) -> Self
Replace confirmations.
Sourcepub const fn with_timeout_ms(self, timeout_ms: u32) -> Self
pub const fn with_timeout_ms(self, timeout_ms: u32) -> Self
Replace timeout_ms.
Sourcepub const fn with_poll_interval_ms(self, poll_interval_ms: u32) -> Self
pub const fn with_poll_interval_ms(self, poll_interval_ms: u32) -> Self
Replace poll_interval_ms.
Sourcepub const fn with_max_polls(self, max_polls: u32) -> Self
pub const fn with_max_polls(self, max_polls: u32) -> Self
Replace max_polls.
Source§impl BrowserWaitConfig
impl BrowserWaitConfig
Sourcepub fn validate(&self) -> Result<(), BrowserError>
pub fn validate(&self) -> Result<(), BrowserError>
Validate before allocating timers or performing provider I/O.
Trait Implementations§
Source§impl Clone for BrowserWaitConfig
impl Clone for BrowserWaitConfig
impl Copy for BrowserWaitConfig
Auto Trait Implementations§
impl Forget for BrowserWaitConfig
impl Freeze for BrowserWaitConfig
impl Move for BrowserWaitConfig
impl RefUnwindSafe for BrowserWaitConfig
impl Send for BrowserWaitConfig
impl Sync for BrowserWaitConfig
impl Unpin for BrowserWaitConfig
impl UnsafeUnpin for BrowserWaitConfig
impl UnwindSafe for BrowserWaitConfig
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