Struct App

Source
pub struct App {
Show 15 fields pub exchanges: Vec<JsonRpcExchange>, pub selected_exchange: usize, pub filter_text: String, pub table_state: TableState, pub details_scroll: usize, pub intercept_details_scroll: usize, pub proxy_config: ProxyConfig, pub is_running: bool, pub message_receiver: Option<UnboundedReceiver<JsonRpcMessage>>, pub input_mode: InputMode, pub input_buffer: String, pub app_mode: AppMode, pub pending_requests: Vec<PendingRequest>, pub selected_pending: usize, pub request_editor_buffer: String,
}

Fields§

§exchanges: Vec<JsonRpcExchange>§selected_exchange: usize§filter_text: String§table_state: TableState§details_scroll: usize§intercept_details_scroll: usize§proxy_config: ProxyConfig§is_running: bool§message_receiver: Option<UnboundedReceiver<JsonRpcMessage>>§input_mode: InputMode§input_buffer: String§app_mode: AppMode§pending_requests: Vec<PendingRequest>§selected_pending: usize§request_editor_buffer: String

Implementations§

Source§

impl App

Source

pub fn new() -> Self

Source

pub fn new_with_receiver(receiver: UnboundedReceiver<JsonRpcMessage>) -> Self

Source

pub fn check_for_new_messages(&mut self)

Source

pub fn add_message(&mut self, message: JsonRpcMessage)

Source

pub fn get_selected_exchange(&self) -> Option<&JsonRpcExchange>

Source

pub fn select_next(&mut self)

Source

pub fn select_previous(&mut self)

Source

pub fn toggle_proxy(&mut self)

Source

pub fn scroll_details_up(&mut self)

Source

pub fn scroll_details_down(&mut self, max_lines: usize, visible_lines: usize)

Source

pub fn reset_details_scroll(&mut self)

Source

pub fn scroll_intercept_details_up(&mut self)

Source

pub fn scroll_intercept_details_down( &mut self, max_lines: usize, visible_lines: usize, )

Source

pub fn reset_intercept_details_scroll(&mut self)

Source

pub fn page_down_intercept_details(&mut self, visible_lines: usize)

Source

pub fn page_up_intercept_details(&mut self)

Source

pub fn goto_top_intercept_details(&mut self)

Source

pub fn goto_bottom_intercept_details( &mut self, max_lines: usize, visible_lines: usize, )

Source

pub fn page_down_details(&mut self, visible_lines: usize)

Source

pub fn page_up_details(&mut self)

Source

pub fn goto_top_details(&mut self)

Source

pub fn goto_bottom_details(&mut self, max_lines: usize, visible_lines: usize)

Source

pub fn start_filtering_requests(&mut self)

Source

pub fn cancel_filtering(&mut self)

Source

pub fn apply_filter(&mut self)

Source

pub fn start_editing_target(&mut self)

Source

pub fn cancel_editing(&mut self)

Source

pub fn confirm_target_edit(&mut self)

Source

pub fn handle_input_char(&mut self, c: char)

Source

pub fn handle_backspace(&mut self)

Source

pub fn get_details_content_lines(&self) -> usize

Source

pub fn toggle_pause_mode(&mut self)

Source

pub fn select_next_pending(&mut self)

Source

pub fn select_previous_pending(&mut self)

Source

pub fn get_selected_pending(&self) -> Option<&PendingRequest>

Source

pub fn allow_selected_request(&mut self)

Source

pub fn block_selected_request(&mut self)

Source

pub fn resume_all_requests(&mut self)

Source

pub fn get_pending_request_json(&self) -> Option<String>

Source

pub fn apply_edited_json(&mut self, edited_json: String) -> Result<(), String>

Source

pub fn get_pending_request_headers(&self) -> Option<String>

Source

pub fn apply_edited_headers( &mut self, edited_headers: String, ) -> Result<(), String>

Source

pub fn get_pending_response_template(&self) -> Option<String>

Source

pub fn complete_selected_request( &mut self, response_json: String, ) -> Result<(), String>

Source

pub async fn send_new_request(&self, request_json: String) -> Result<(), String>

Trait Implementations§

Source§

impl Default for App

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl Freeze for App

§

impl !RefUnwindSafe for App

§

impl Send for App

§

impl Sync for App

§

impl Unpin for App

§

impl !UnwindSafe for App

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,