pub struct EventReply {
pub id: RequestId,
pub reply_to: String,
pub result: Value,
}Expand description
A reply from local end to remote end for events requiring a decision.
Used for network interception to allow/block/redirect requests.
§Format
{
"id": "event-uuid",
"replyTo": "network.beforeRequestSent",
"result": { "action": "block" }
}Fields§
§id: RequestIdMatches the event’s ID.
reply_to: StringEvent method being replied to.
result: ValueDecision/action to take.
Implementations§
Source§impl EventReply
impl EventReply
Sourcepub fn new(id: RequestId, reply_to: impl Into<String>, result: Value) -> Self
pub fn new(id: RequestId, reply_to: impl Into<String>, result: Value) -> Self
Creates a new event reply.
Sourcepub fn allow(id: RequestId, reply_to: impl Into<String>) -> Self
pub fn allow(id: RequestId, reply_to: impl Into<String>) -> Self
Creates an “allow” reply for network events.
Trait Implementations§
Source§impl Clone for EventReply
impl Clone for EventReply
Source§fn clone(&self) -> EventReply
fn clone(&self) -> EventReply
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 moreSource§impl Debug for EventReply
impl Debug for EventReply
Auto Trait Implementations§
impl Freeze for EventReply
impl RefUnwindSafe for EventReply
impl Send for EventReply
impl Sync for EventReply
impl Unpin for EventReply
impl UnwindSafe for EventReply
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