pub struct LocalUtils { /* private fields */ }Expand description
LocalUtils protocol object
Provides client-side utility operations: HAR file replay, zip, tracing helpers.
Implementations§
Source§impl LocalUtils
impl LocalUtils
pub fn new( parent: ParentOrConnection, type_name: String, guid: Arc<str>, initializer: Value, ) -> Result<Self>
Sourcepub async fn har_open(&self, file: &str) -> Result<String>
pub async fn har_open(&self, file: &str) -> Result<String>
Opens a HAR file and returns an opaque HAR ID for subsequent lookups.
Sends "harOpen" RPC with the file path.
Sourcepub async fn har_lookup(
&self,
har_id: &str,
url: &str,
method: &str,
headers: Vec<Value>,
post_data: Option<&[u8]>,
is_navigation_request: bool,
) -> Result<HarLookupResult>
pub async fn har_lookup( &self, har_id: &str, url: &str, method: &str, headers: Vec<Value>, post_data: Option<&[u8]>, is_navigation_request: bool, ) -> Result<HarLookupResult>
Looks up a request in the opened HAR archive.
Returns an action object describing how the request should be fulfilled, redirected, or allowed to fall through.
Trait Implementations§
Source§impl Clone for LocalUtils
impl Clone for LocalUtils
Source§fn clone(&self) -> LocalUtils
fn clone(&self) -> LocalUtils
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !Freeze for LocalUtils
impl !RefUnwindSafe for LocalUtils
impl Send for LocalUtils
impl Sync for LocalUtils
impl Unpin for LocalUtils
impl UnsafeUnpin for LocalUtils
impl !UnwindSafe for LocalUtils
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