#[non_exhaustive]pub struct StartHarOptions {
pub content: Option<HarContent>,
pub mode: Option<HarMode>,
pub url_filter: Option<String>,
pub resources_dir: Option<String>,
}Expand description
Options for Tracing::start_har.
§Example
use playwright_rs::{StartHarOptions, HarContent, HarMode};
let opts = StartHarOptions::default()
.content(HarContent::Attach)
.mode(HarMode::Minimal)
.url_filter("**/api/**");See: https://playwright.dev/docs/api/class-tracing#tracing-start-har
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.content: Option<HarContent>How resource bodies are stored. Defaults to Attach for a .zip path,
Embed otherwise.
mode: Option<HarMode>Level of detail. Defaults to HarMode::Full.
url_filter: Option<String>Glob pattern; only requests whose URL matches are recorded.
resources_dir: Option<String>Directory to store attach-mode resource files in (for non-zip paths).
Implementations§
Source§impl StartHarOptions
impl StartHarOptions
Sourcepub fn content(self, content: HarContent) -> Self
pub fn content(self, content: HarContent) -> Self
How resource bodies are stored (Attach / Embed / Omit).
Sourcepub fn url_filter(self, url_filter: impl Into<String>) -> Self
pub fn url_filter(self, url_filter: impl Into<String>) -> Self
Glob pattern; only requests whose URL matches are recorded.
Sourcepub fn resources_dir(self, resources_dir: impl Into<String>) -> Self
pub fn resources_dir(self, resources_dir: impl Into<String>) -> Self
Directory to store attach-mode resource files in (for non-zip paths).
Trait Implementations§
Source§impl Clone for StartHarOptions
impl Clone for StartHarOptions
Source§fn clone(&self) -> StartHarOptions
fn clone(&self) -> StartHarOptions
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 moreSource§impl Debug for StartHarOptions
impl Debug for StartHarOptions
Source§impl Default for StartHarOptions
impl Default for StartHarOptions
Source§fn default() -> StartHarOptions
fn default() -> StartHarOptions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for StartHarOptions
impl RefUnwindSafe for StartHarOptions
impl Send for StartHarOptions
impl Sync for StartHarOptions
impl Unpin for StartHarOptions
impl UnsafeUnpin for StartHarOptions
impl UnwindSafe for StartHarOptions
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