pub struct FlowModification {
pub method: Option<String>,
pub url: Option<String>,
pub request_headers: Option<HashMap<String, String>>,
pub request_body: Option<String>,
pub status_code: Option<u16>,
pub response_headers: Option<HashMap<String, String>>,
pub response_body: Option<String>,
pub message_content: Option<String>,
}Expand description
对截获中的 Flow 的修改意图。 由各适配层(Tauri、MCP 等)在 resolve_intercept 时传入, 描述用户希望如何改变请求/响应/WebSocket 消息。
Fields§
§method: Option<String>§url: Option<String>§request_headers: Option<HashMap<String, String>>§request_body: Option<String>§status_code: Option<u16>§response_headers: Option<HashMap<String, String>>§response_body: Option<String>§message_content: Option<String>Implementations§
Source§impl FlowModification
impl FlowModification
pub fn is_empty(&self) -> bool
pub fn into_option(self) -> Option<Self>
pub fn from_json_value(value: &Value) -> Self
Trait Implementations§
Source§impl Clone for FlowModification
impl Clone for FlowModification
Source§fn clone(&self) -> FlowModification
fn clone(&self) -> FlowModification
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 FlowModification
impl Debug for FlowModification
Source§impl Default for FlowModification
impl Default for FlowModification
Source§fn default() -> FlowModification
fn default() -> FlowModification
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for FlowModification
impl<'de> Deserialize<'de> for FlowModification
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for FlowModification
impl RefUnwindSafe for FlowModification
impl Send for FlowModification
impl Sync for FlowModification
impl Unpin for FlowModification
impl UnsafeUnpin for FlowModification
impl UnwindSafe for FlowModification
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