#[non_exhaustive]pub struct BrowserSocketConfig {
pub rpc: BrowserConfig,
pub max_subscriptions: usize,
pub max_notifications: usize,
pub max_queued_bytes: usize,
}Expand description
Browser WebSocket request and notification resource limits.
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.rpc: BrowserConfigRequest size, response size, deadline and shared concurrency limits.
max_subscriptions: usizeActive plus pending subscriptions, 1..=128.
max_notifications: usizeQueued notifications per subscription, 1..=1024.
max_queued_bytes: usizeTotal queued UTF-8 notification bytes across the session, at most 128 MiB.
Implementations§
Source§impl BrowserSocketConfig
impl BrowserSocketConfig
Sourcepub const fn with_rpc(self, rpc: BrowserConfig) -> Self
pub const fn with_rpc(self, rpc: BrowserConfig) -> Self
Replace rpc.
Sourcepub const fn with_max_subscriptions(self, max_subscriptions: usize) -> Self
pub const fn with_max_subscriptions(self, max_subscriptions: usize) -> Self
Replace max_subscriptions.
Sourcepub const fn with_max_notifications(self, max_notifications: usize) -> Self
pub const fn with_max_notifications(self, max_notifications: usize) -> Self
Replace max_notifications.
Sourcepub const fn with_max_queued_bytes(self, max_queued_bytes: usize) -> Self
pub const fn with_max_queued_bytes(self, max_queued_bytes: usize) -> Self
Replace max_queued_bytes.
Source§impl BrowserSocketConfig
impl BrowserSocketConfig
Sourcepub fn validate(&self) -> Result<(), BrowserError>
pub fn validate(&self) -> Result<(), BrowserError>
Validate without opening a socket or accessing browser globals.
Trait Implementations§
Source§impl Clone for BrowserSocketConfig
impl Clone for BrowserSocketConfig
impl Copy for BrowserSocketConfig
Source§impl Debug for BrowserSocketConfig
impl Debug for BrowserSocketConfig
Auto Trait Implementations§
impl Forget for BrowserSocketConfig
impl Freeze for BrowserSocketConfig
impl Move for BrowserSocketConfig
impl RefUnwindSafe for BrowserSocketConfig
impl Send for BrowserSocketConfig
impl Sync for BrowserSocketConfig
impl Unpin for BrowserSocketConfig
impl UnsafeUnpin for BrowserSocketConfig
impl UnwindSafe for BrowserSocketConfig
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