#[non_exhaustive]pub struct RecordHar {
pub path: String,
pub omit_content: Option<bool>,
pub content: Option<String>,
pub mode: Option<String>,
pub url_filter: Option<String>,
}Expand description
Options for recording HAR.
See: https://playwright.dev/docs/api/class-browser#browser-new-context-option-record-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.path: StringPath on the filesystem to write the HAR file to.
omit_content: Option<bool>Optional setting to control whether to omit request content from the HAR.
content: Option<String>Optional setting to control resource content management. “omit” | “embed” | “attach”
mode: Option<String>“full” | “minimal”
url_filter: Option<String>A glob or regex pattern to filter requests that are stored in the HAR.
Implementations§
Source§impl RecordHar
impl RecordHar
Sourcepub fn omit_content(self, omit_content: bool) -> Self
pub fn omit_content(self, omit_content: bool) -> Self
Omit response bodies from the HAR.
Sourcepub fn content(self, content: impl Into<String>) -> Self
pub fn content(self, content: impl Into<String>) -> Self
Content mode (“embed”, “attach”, or “omit”).
Sourcepub fn url_filter(self, url_filter: impl Into<String>) -> Self
pub fn url_filter(self, url_filter: impl Into<String>) -> Self
Only record requests matching this URL glob.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RecordHar
impl RefUnwindSafe for RecordHar
impl Send for RecordHar
impl Sync for RecordHar
impl Unpin for RecordHar
impl UnsafeUnpin for RecordHar
impl UnwindSafe for RecordHar
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