pub struct NetworkPreset {
pub name: &'static str,
pub offline: bool,
pub latency_ms: f64,
pub download_throughput: f64,
pub upload_throughput: f64,
}Expand description
Network throttling presets aligned with Chrome DevTools / Puppeteer PredefinedNetworkConditions.
Fields§
§name: &'static strHuman-readable preset name (Slow 3G, Fast 4G, …).
offline: boolWhen true, network is forced offline.
latency_ms: f64Extra RTT latency in milliseconds.
download_throughput: f64Download throughput in bytes/sec (-1.0 = unlimited).
upload_throughput: f64Upload throughput in bytes/sec (-1.0 = unlimited).
Trait Implementations§
Source§impl Clone for NetworkPreset
impl Clone for NetworkPreset
Source§fn clone(&self) -> NetworkPreset
fn clone(&self) -> NetworkPreset
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for NetworkPreset
Auto Trait Implementations§
impl Freeze for NetworkPreset
impl RefUnwindSafe for NetworkPreset
impl Send for NetworkPreset
impl Sync for NetworkPreset
impl Unpin for NetworkPreset
impl UnsafeUnpin for NetworkPreset
impl UnwindSafe for NetworkPreset
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