Struct SystemState

Source
pub struct SystemState {
Show 31 fields pub user: UserState, pub(crate) translators: TranslatorList, pub channels: Channels, pub(crate) progress_tracker: Option<LoadProgress>, pub(crate) command_prompt: CommandPrompt, pub(crate) context: Option<Arc<Context>>, pub(crate) batch_messages: VecDeque<Message>, pub(crate) batch_messages_completed: bool, pub(crate) wcp_server_thread: Option<JoinHandle<()>>, pub(crate) wcp_server_address: Option<String>, pub(crate) wcp_stop_signal: Arc<AtomicBool>, pub(crate) wcp_running_signal: Arc<AtomicBool>, pub(crate) wcp_greeted_signal: Arc<AtomicBool>, pub(crate) wcp_client_capabilities: WcpClientCapabilities, pub(crate) draw_data: RefCell<Vec<Option<CachedDrawData>>>, pub(crate) variable_name_info_cache: RefCell<HashMap<VariableRef, Option<VariableNameInfo>>>, pub(crate) gesture_start_location: Option<Pos2>, pub(crate) measure_start_location: Option<Pos2>, pub(crate) url: RefCell<String>, pub(crate) command_prompt_text: RefCell<String>, pub(crate) last_canvas_rect: RefCell<Option<Rect>>, pub(crate) item_renaming_string: RefCell<String>, pub(crate) items_to_expand: RefCell<Vec<(DisplayedItemRef, usize)>>, pub(crate) char_to_add_to_prompt: RefCell<Option<char>>, pub(crate) continuous_redraw: bool, pub(crate) rendering_cpu_times: VecDeque<f32>, pub(crate) timing: RefCell<Timing>, pub(crate) undo_stack: Vec<CanvasState>, pub(crate) redo_stack: Vec<CanvasState>, pub(crate) url_callback: Option<Box<dyn Fn(String) -> Message + Send + 'static>>, pub(crate) expand_parameter_section: bool,
}

Fields§

§user: UserState§translators: TranslatorList

Which translator to use for each variable

§channels: Channels

Channels for messages generated by other threads

§progress_tracker: Option<LoadProgress>

Tracks progress of file/variable loading operations.

§command_prompt: CommandPrompt

Buffer for the command input

§context: Option<Arc<Context>>

The context to egui, we need this to change the visual settings when the config is reloaded

§batch_messages: VecDeque<Message>

List of batch messages which will executed as soon as possible

§batch_messages_completed: bool§wcp_server_thread: Option<JoinHandle<()>>

The WCP server

§wcp_server_address: Option<String>§wcp_stop_signal: Arc<AtomicBool>§wcp_running_signal: Arc<AtomicBool>§wcp_greeted_signal: Arc<AtomicBool>§wcp_client_capabilities: WcpClientCapabilities§draw_data: RefCell<Vec<Option<CachedDrawData>>>

The draw commands for every variable currently selected

§variable_name_info_cache: RefCell<HashMap<VariableRef, Option<VariableNameInfo>>>§gesture_start_location: Option<Pos2>§measure_start_location: Option<Pos2>§url: RefCell<String>§command_prompt_text: RefCell<String>§last_canvas_rect: RefCell<Option<Rect>>§item_renaming_string: RefCell<String>§items_to_expand: RefCell<Vec<(DisplayedItemRef, usize)>>

These items should be expanded into subfields in the next frame. Cleared after each frame

§char_to_add_to_prompt: RefCell<Option<char>>

Character to add to the command prompt if it is visible. This is only needed for presentations at them moment.

§continuous_redraw: bool

Invalidate draw commands every frame to make performance comparison easier

§rendering_cpu_times: VecDeque<f32>§timing: RefCell<Timing>§undo_stack: Vec<CanvasState>§redo_stack: Vec<CanvasState>§url_callback: Option<Box<dyn Fn(String) -> Message + Send + 'static>>§expand_parameter_section: bool

Implementations§

Source§

impl SystemState

Source

pub(crate) fn handle_batch_commands(&mut self)

After user messages are addressed, we try to execute batch commands as they are ready to run

Source

pub(crate) fn can_start_batch_command(&self) -> bool

Returns whether it is OK to start a new batch command.

Source

pub fn batch_commands_completed(&self) -> bool

Returns true once all batch commands have been completed and their effects are all executed.

Source

pub fn add_batch_commands<I: IntoIterator<Item = String>>( &mut self, commands: I, )

Source

pub fn add_batch_messages<I: IntoIterator<Item = Message>>( &mut self, messages: I, )

Source

pub fn add_batch_message(&mut self, msg: Message)

Source

pub fn parse_batch_commands<I: IntoIterator<Item = String>>( &mut self, cmds: I, ) -> Vec<Message>

Source

pub fn load_commands_from_url(&mut self, url: String)

Source§

impl SystemState

Source

pub fn draw_performance_graph(&self, ctx: &Context, msgs: &mut Vec<Message>)

Source§

impl SystemState

Source

pub(crate) fn draw_open_sibling_state_file_dialog( &self, ctx: &Context, dialog: &OpenSiblingStateFileDialog, msgs: &mut Vec<Message>, )

Draw a dialog that asks the user if it wants to load a state file situated in the same directory as the waveform file.

Source

pub(crate) fn draw_reload_waveform_dialog( &self, ctx: &Context, dialog: &ReloadWaveformDialog, msgs: &mut Vec<Message>, )

Draw a dialog that asks for user confirmation before re-loading a file. This is triggered by a file loading event from disk.

Source§

impl SystemState

Source

pub fn invalidate_draw_commands(&mut self)

Source

pub fn generate_draw_commands( &self, cfg: &DrawConfig, frame_width: f32, msgs: &mut Vec<Message>, viewport_idx: usize, )

Source

fn generate_wave_draw_commands( &self, waves: &WaveData, cfg: &DrawConfig, frame_width: f32, msgs: &mut Vec<Message>, viewport_idx: usize, ) -> Option<CachedDrawData>

Source

fn generate_transaction_draw_commands( &self, waves: &WaveData, cfg: &DrawConfig, frame_width: f32, msgs: &mut Vec<Message>, viewport_idx: usize, ) -> Option<CachedDrawData>

Source

fn transform_pos(&self, to_screen: RectTransform, p: Pos2, ui: &Ui) -> Pos2

Source

pub fn draw_items( &mut self, egui_ctx: &Context, msgs: &mut Vec<Message>, ui: &mut Ui, viewport_idx: usize, )

Source

fn draw_wave_data( &self, waves: &WaveData, draw_data: &CachedWaveDrawData, ctx: &mut DrawingContext<'_>, )

Source

fn draw_transaction_data( &self, waves: &WaveData, draw_data: &CachedTransactionDrawData, viewport_idx: usize, frame_width: f32, cfg: &DrawConfig, ui: &mut Ui, msgs: &mut Vec<Message>, ctx: &mut DrawingContext<'_>, )

Source

fn draw_region( &self, ((old_x, prev_region), (new_x, _)): (&(f32, DrawnRegion), &(f32, DrawnRegion)), user_color: Color32, offset: f32, height_scaling_factor: f32, ctx: &mut DrawingContext<'_>, text_color: Color32, )

Source

fn draw_bool_transition( &self, ((old_x, prev_region), (new_x, new_region)): (&(f32, DrawnRegion), &(f32, DrawnRegion)), force_anti_alias: bool, color: Color32, offset: f32, height_scaling_factor: f32, draw_clock_marker: bool, draw_background: bool, ctx: &mut DrawingContext<'_>, )

Source

fn draw_arrow( &self, start: Pos2, end: Pos2, color: Color32, ctx: &DrawingContext<'_>, )

Draws a curvy arrow from start to end.

Source

fn draw_arrowheads( &self, vec_start: Pos2, vec_tip: Pos2, ctx: &DrawingContext<'_>, stroke: Stroke, )

Draws arrowheads for the vector going from vec_start to vec_tip. The angle has to be in degrees.

Source

fn handle_canvas_context_menu( &self, response: Response, waves: &WaveData, to_screen: RectTransform, ctx: &mut DrawingContext<'_>, msgs: &mut Vec<Message>, viewport_idx: usize, )

Source

fn snap_to_edge( &self, pointer_pos_canvas: Option<Pos2>, waves: &WaveData, frame_width: f32, viewport_idx: usize, ) -> Option<BigInt>

Takes a pointer pos in the canvas and returns a position that is snapped to transitions if the cursor is close enough to any transition. If the cursor is on the canvas and no transitions are close enough for snapping, the raw point will be returned. If the cursor is off the canvas, None is returned

Source

pub fn draw_line( &self, time: &BigInt, ctx: &mut DrawingContext<'_>, size: Vec2, viewport: &Viewport, waves: &WaveData, )

Source§

impl SystemState

Source

fn file_dialog<F>( &mut self, title: &'static str, filter: (String, Vec<String>), message: F, )
where F: FnOnce(PathBuf) -> Message + Send + 'static,

Source

pub fn open_file_dialog(&mut self, mode: OpenMode)

Source

pub fn open_command_file_dialog(&mut self)

Source§

impl SystemState

Source

pub fn help_message(&self, ui: &mut Ui)

Source§

impl SystemState

Source

pub fn handle_pressed_keys(&self, ctx: &Context, msgs: &mut Vec<Message>)

Source

pub fn get_count(&self) -> usize

Source§

impl SystemState

Source

pub fn draw_log_window(&self, ctx: &Context, msgs: &mut Vec<Message>)

Source§

impl SystemState

Source

pub fn draw_marker_window( &self, waves: &WaveData, ctx: &Context, msgs: &mut Vec<Message>, )

Source

pub fn draw_marker_boxes( &self, waves: &WaveData, ctx: &mut DrawingContext<'_>, view_width: f32, gap: f32, viewport: &Viewport, y_zero: f32, )

Source§

impl SystemState

Source

pub fn add_menu_panel(&self, ctx: &Context, msgs: &mut Vec<Message>)

Source

pub fn menu_contents(&self, ui: &mut Ui, msgs: &mut Vec<Message>)

Source

pub fn item_context_menu( &self, path: Option<&FieldRef>, msgs: &mut Vec<Message>, ui: &mut Ui, vidx: VisibleItemIndex, )

Source

fn add_format_menu( &self, displayed_field_ref: &DisplayedFieldRef, displayed_item: &DisplayedItem, path: &FieldRef, msgs: &mut Vec<Message>, ui: &mut Ui, )

Source§

impl SystemState

Source

pub fn draw_mouse_gesture_widget( &self, egui_ctx: &Context, waves: &WaveData, pointer_pos_canvas: Option<Pos2>, response: &Response, msgs: &mut Vec<Message>, ctx: &mut DrawingContext<'_>, viewport_idx: usize, )

Draw the mouse gesture widget, i.e., the line(s) and text showing which gesture is being drawn.

Source

fn stop_dragging( &self, pointer_pos_canvas: Option<Pos2>, start_location: Pos2, msgs: &mut Vec<Message>, viewport_idx: usize, waves: &WaveData, frame_width: f32, )

Source

fn start_dragging( &self, pointer_pos_canvas: Option<Pos2>, start_location: Pos2, ctx: &mut DrawingContext<'_>, response: &Response, waves: &WaveData, viewport_idx: usize, )

Source

fn draw_gesture_line( &self, start: Pos2, end: Pos2, text: &str, active: bool, ctx: &mut DrawingContext<'_>, )

Draw the line used by most mouse gestures.

Source

fn draw_zoom_in_gesture( &self, start_location: Pos2, current_location: Pos2, response: &Response, ctx: &mut DrawingContext<'_>, waves: &WaveData, viewport_idx: usize, measure: bool, )

Draw the lines used for the zoom-in gesture.

Source

pub fn mouse_gesture_help(&self, ctx: &Context, msgs: &mut Vec<Message>)

Draw the mouse gesture help window.

Source

pub fn draw_measure_widget( &self, egui_ctx: &Context, waves: &WaveData, pointer_pos_canvas: Option<Pos2>, response: &Response, msgs: &mut Vec<Message>, ctx: &mut DrawingContext<'_>, viewport_idx: usize, )

Source§

impl SystemState

Source

pub fn add_overview_panel( &self, ctx: &Context, waves: &WaveData, msgs: &mut Vec<Message>, )

Source

fn draw_overview(&self, ui: &mut Ui, waves: &WaveData, msgs: &mut Vec<Message>)

Source§

impl SystemState

Source

pub fn with_params(self, args: StartupParams) -> Self

Source

pub fn wcp(&mut self)

Source

pub(crate) fn get_scope( &mut self, scope: ScopeRef, recursive: bool, ) -> Vec<VariableRef>

Source

pub(crate) fn on_waves_loaded( &mut self, filename: WaveSource, format: WaveFormat, new_waves: Box<WaveContainer>, load_options: LoadOptions, )

Source

pub(crate) fn on_transaction_streams_loaded( &mut self, filename: WaveSource, format: WaveFormat, new_ftr: TransactionContainer, _loaded_options: LoadOptions, )

Source

pub(crate) fn handle_async_messages(&mut self)

Source

pub fn get_visuals(&self) -> Visuals

Source

pub(crate) fn load_state( &mut self, loaded_state: Box<UserState>, path: Option<PathBuf>, )

Source

pub fn waves_fully_loaded(&self) -> bool

Returns true if the waveform and all requested signals have been loaded. Used for testing to make sure the GUI is at its final state before taking a snapshot.

Source

pub(crate) fn current_canvas_state( waves: &WaveData, message: String, ) -> CanvasState

Returns the current canvas state

Source

pub(crate) fn save_current_canvas(&mut self, message: String)

Push the current canvas state to the undo stack

Source

pub(crate) fn start_wcp_server( &mut self, address: Option<String>, initiate: bool, )

Source

pub(crate) fn stop_wcp_server(&mut self)

Source§

impl SystemState

Source

pub fn load_state_file(&mut self, path: Option<PathBuf>)

Source

pub fn save_state_file(&mut self, path: Option<PathBuf>)

Source

fn encode_state(&self) -> Option<String>

Source§

impl SystemState

Source

pub fn get_item_text_color(&self, item: &DisplayedItem) -> &Color32

Source

pub fn show_statusbar(&self) -> bool

Source

pub fn show_toolbar(&self) -> bool

Source

pub fn show_overview(&self) -> bool

Source

pub fn show_hierarchy(&self) -> bool

Source

pub fn show_tooltip(&self) -> bool

Source

pub fn show_scope_tooltip(&self) -> bool

Source

pub fn show_ticks(&self) -> bool

Source

pub fn show_menu(&self) -> bool

Source

pub fn show_variable_indices(&self) -> bool

Source

pub fn show_variable_direction(&self) -> bool

Source

pub fn ui_zoom_factor(&self) -> f32

Source

pub fn show_empty_scopes(&self) -> bool

Source

pub fn show_parameters_in_scopes(&self) -> bool

Source

pub fn show_default_timeline(&self) -> bool

Source

pub fn highlight_focused(&self) -> bool

Source

pub fn fill_high_values(&self) -> bool

Source§

impl SystemState

Source

pub fn add_statusbar_panel( &self, ctx: &Context, waves: &Option<WaveData>, msgs: &mut Vec<Message>, )

Source

fn draw_statusbar( &self, ui: &mut Ui, waves: &Option<WaveData>, msgs: &mut Vec<Message>, )

Source§

impl SystemState

Source

pub fn new() -> Result<SystemState>

Source

fn new_inner(force_default_config: bool) -> Result<SystemState>

Source§

impl SystemState

Source§

impl SystemState

Source

pub fn add_toolbar_panel(&self, ctx: &Context, msgs: &mut Vec<Message>)

Add panel and draw toolbar.

Source

fn simulation_status_toolbar(&self, ui: &mut Ui, msgs: &mut Vec<Message>)

Source

fn draw_toolbar(&self, ui: &mut Ui, msgs: &mut Vec<Message>)

Source§

impl SystemState

Source

pub fn draw_variable_filter_edit( &mut self, ui: &mut Ui, msgs: &mut Vec<Message>, )

Source

pub fn variable_filter_type_menu(&self, ui: &mut Ui, msgs: &mut Vec<Message>)

Source

pub fn variable_cmp( &self, a: &VariableRef, b: &VariableRef, wave_container: Option<&WaveContainer>, ) -> Ordering

Source

pub fn filtered_variables( &self, variables: &[VariableRef], variable_filter: &VariableFilter, ) -> Vec<VariableRef>

Source§

impl SystemState

Source

pub(crate) fn draw( &mut self, ctx: &Context, window_size: Option<Vec2>, ) -> Vec<Message>

Source

fn draw_load_url(&self, ctx: &Context, msgs: &mut Vec<Message>)

Source

fn handle_pointer_in_ui(&self, ui: &mut Ui, msgs: &mut Vec<Message>)

Source

pub fn draw_all_scopes( &self, msgs: &mut Vec<Message>, wave: &WaveData, draw_variables: bool, ui: &mut Ui, filter: &VariableFilter, )

Source

fn add_scope_selectable_label( &self, msgs: &mut Vec<Message>, wave: &WaveData, scope: &ScopeRef, ui: &mut Ui, )

Source

fn draw_selectable_child_or_orphan_scope( &self, msgs: &mut Vec<Message>, wave: &WaveData, scope: &ScopeRef, draw_variables: bool, ui: &mut Ui, filter: &VariableFilter, )

Source

fn draw_root_scope_view( &self, msgs: &mut Vec<Message>, wave: &WaveData, root_scope: &ScopeRef, draw_variables: bool, ui: &mut Ui, filter: &VariableFilter, )

Source

pub fn draw_variable_list( &self, msgs: &mut Vec<Message>, wave_container: &WaveContainer, ui: &mut Ui, all_variables: &[VariableRef], row_range: Option<Range<usize>>, filter: &VariableFilter, )

Source

pub fn draw_filtered_variable_list( &self, msgs: &mut Vec<Message>, wave_container: &WaveContainer, ui: &mut Ui, all_variables: &[VariableRef], row_range: Option<Range<usize>>, )

Source

fn draw_item_focus_list(&self, ui: &mut Ui)

Source

fn hierarchy_icon( &self, ui: &mut Ui, has_children: bool, unfolded: bool, alignment: Align, ) -> Response

Source

fn draw_item_list( &mut self, msgs: &mut Vec<Message>, ui: &mut Ui, ctx: &Context, )

Source

fn draw_transaction_root( &self, msgs: &mut Vec<Message>, streams: &WaveData, ui: &mut Ui, )

Source

pub fn draw_transaction_variable_list( &self, msgs: &mut Vec<Message>, streams: &WaveData, ui: &mut Ui, active_stream: &StreamScopeRef, )

Source

fn draw_focused_transaction_details(&self, ui: &mut Ui)

Source

fn get_name_alignment(&self) -> Align

Source

fn draw_drag_source( &self, msgs: &mut Vec<Message>, vidx: VisibleItemIndex, item_response: &Response, )

Source

fn draw_variable_label( &self, vidx: VisibleItemIndex, displayed_item: &DisplayedItem, displayed_id: DisplayedItemRef, field: FieldRef, msgs: &mut Vec<Message>, ui: &mut Ui, ctx: &Context, ) -> Response

Source

fn draw_variable( &self, msgs: &mut Vec<Message>, vidx: VisibleItemIndex, displayed_item: &DisplayedItem, displayed_id: DisplayedItemRef, field: FieldRef, drawing_infos: &mut Vec<ItemDrawingInfo>, info: &VariableInfo, ui: &mut Ui, ctx: &Context, levels_to_force_expand: Option<usize>, alignment: Align, ) -> Rect

Source

fn draw_drag_target( &self, msgs: &mut Vec<Message>, vidx: VisibleItemIndex, expanded_rect: Rect, available_rect: Rect, ui: &mut Ui, last: bool, )

Source

fn draw_plain_item( &self, msgs: &mut Vec<Message>, vidx: VisibleItemIndex, displayed_id: DisplayedItemRef, displayed_item: &DisplayedItem, drawing_infos: &mut Vec<ItemDrawingInfo>, ui: &mut Ui, ) -> Rect

Source

fn get_alpha_focus_id(&self, vidx: VisibleItemIndex) -> RichText

Source

fn item_is_focused(&self, vidx: VisibleItemIndex) -> bool

Source

fn item_is_selected(&self, id: DisplayedItemRef) -> bool

Source

fn draw_var_values(&self, ui: &mut Ui, msgs: &mut Vec<Message>)

Source

pub fn get_variable_value( &self, waves: &WaveData, displayed_field_ref: &DisplayedFieldRef, ucursor: &Option<BigUint>, ) -> Option<String>

Source

pub fn get_variable_name_info( &self, wave_container: &WaveContainer, var: &VariableRef, ) -> Option<VariableNameInfo>

Source

pub fn draw_background( &self, drawing_info: &ItemDrawingInfo, y_zero: f32, ctx: &DrawingContext<'_>, gap: f32, frame_width: f32, background_color: &Color32, )

Source

pub fn get_background_color( &self, waves: &WaveData, drawing_info: &ItemDrawingInfo, vidx: VisibleItemIndex, ) -> Color32

Source

fn get_default_alternating_background_color( &self, vidx: VisibleItemIndex, ) -> &Color32

Source

pub fn draw_default_timeline( &self, waves: &WaveData, ctx: &DrawingContext<'_>, viewport_idx: usize, frame_width: f32, cfg: &DrawConfig, )

Draw the default timeline at the top of the canvas

Source§

impl SystemState

Source

pub fn load_from_file( &mut self, filename: Utf8PathBuf, load_options: LoadOptions, ) -> Result<()>

Source

pub fn load_from_bytes( &mut self, source: WaveSource, bytes: Vec<u8>, load_options: LoadOptions, )

Source

pub fn load_wave_from_file( &mut self, filename: Utf8PathBuf, load_options: LoadOptions, ) -> Result<()>

Source

pub fn load_from_data( &mut self, data: Vec<u8>, load_options: LoadOptions, ) -> Result<()>

Source

pub fn load_from_dropped(&mut self, file: DroppedFile) -> Result<()>

Source

pub fn load_wave_from_url(&mut self, url: String, load_options: LoadOptions)

Source

pub fn load_transactions_from_file( &mut self, filename: Utf8PathBuf, load_options: LoadOptions, ) -> Result<()>

Source

pub fn load_transactions_from_bytes( &mut self, source: WaveSource, bytes: Vec<u8>, load_options: LoadOptions, )

Source

fn get_hierarchy_from_server( sender: Sender<Message>, server: String, load_options: LoadOptions, )

Source

pub fn get_time_table_from_server(sender: Sender<Message>, server: String)

Source

fn get_server_status(sender: Sender<Message>, server: String, delay_ms: u64)

Source

pub fn server_status_to_progress(&mut self, server: String, status: Status)

uses the server status in order to display a loading bar

Source

pub fn connect_to_cxxrtl(&mut self, kind: CxxrtlKind, keep_variables: bool)

Source

pub fn load_wave_from_bytes( &mut self, source: WaveSource, bytes: Vec<u8>, load_options: LoadOptions, )

Source

fn get_thread_pool() -> Option<ThreadPool>

Source

pub fn load_wave_body<R: BufRead + Seek + Sync + Send + 'static>( &mut self, source: WaveSource, cont: ReadBodyContinuation<R>, body_len: u64, hierarchy: Arc<Hierarchy>, )

Source

pub fn load_variables(&mut self, cmd: LoadSignalsCmd)

Source§

impl SystemState

Source

pub fn handle_wcp_commands(&mut self)

Source

fn handle_wcp_cs_message(&mut self, message: &WcpCSMessage)

Source

fn send_greeting(&self)

Source

fn send_response(&self, result: WcpResponse)

Source

fn send_error(&self, error: &str, arguments: Vec<String>, message: &str)

Source

fn get_displayed_items(&self, waves: &WaveData) -> Vec<DisplayedItemRef>

Source§

impl SystemState

Source

pub fn update(&mut self, message: Message) -> Option<()>

Source

pub fn add_scope_as_group( &mut self, scope: ScopeRef, pos: TargetPosition, recursive: bool, )

Source

pub(crate) fn handle_variable_clipboard_operation<F>( &self, vidx: MessageTarget<VisibleItemIndex>, get_text: F, )

Trait Implementations§

Source§

impl App for SystemState

Source§

fn update(&mut self, ctx: &Context, frame: &mut Frame)

Called each time the UI needs repainting, which may be many times per second. Read more
Source§

fn save(&mut self, _storage: &mut dyn Storage)

Called on shutdown, and perhaps at regular intervals. Allows you to save state. Read more
Source§

fn on_exit(&mut self, _gl: Option<&Context>)

Called once on shutdown, after Self::save. Read more
Source§

fn auto_save_interval(&self) -> Duration

Time between automatic calls to Self::save
Source§

fn clear_color(&self, _visuals: &Visuals) -> [f32; 4]

Background color values for the app, e.g. what is sent to gl.clearColor. Read more
Source§

fn persist_egui_memory(&self) -> bool

Controls whether or not the egui memory (window positions etc) will be persisted (only if the “persistence” feature is enabled).
Source§

fn raw_input_hook(&mut self, _ctx: &Context, _raw_input: &mut RawInput)

A hook for manipulating or filtering raw input before it is processed by Self::update. Read more
Source§

impl From<UserState> for SystemState

Source§

fn from(serializable_state: UserState) -> SystemState

Converts to this type from the input type.

Auto Trait Implementations§

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> Conv for T

Source§

fn conv<T>(self) -> T
where Self: Into<T>,

Converts self into T using Into<T>. Read more
Source§

impl<T> Downcast for T
where T: Any,

Source§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
Source§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
Source§

fn as_any(&self) -> &(dyn Any + 'static)

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> GetSetFdFlags for T

Source§

fn get_fd_flags(&self) -> Result<FdFlags, Error>
where T: AsFilelike,

Query the “status” flags for the self file descriptor.
Source§

fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>
where T: AsFilelike,

Create a new SetFdFlags value for use with set_fd_flags. Read more
Source§

fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>
where T: AsFilelike,

Set the “status” flags for the self file descriptor. Read more
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<D> OwoColorize for D

Source§

fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>
where C: Color,

Set the foreground color generically Read more
Source§

fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>
where C: Color,

Set the background color generically. Read more
Source§

fn black(&self) -> FgColorDisplay<'_, Black, Self>

Change the foreground color to black
Source§

fn on_black(&self) -> BgColorDisplay<'_, Black, Self>

Change the background color to black
Source§

fn red(&self) -> FgColorDisplay<'_, Red, Self>

Change the foreground color to red
Source§

fn on_red(&self) -> BgColorDisplay<'_, Red, Self>

Change the background color to red
Source§

fn green(&self) -> FgColorDisplay<'_, Green, Self>

Change the foreground color to green
Source§

fn on_green(&self) -> BgColorDisplay<'_, Green, Self>

Change the background color to green
Source§

fn yellow(&self) -> FgColorDisplay<'_, Yellow, Self>

Change the foreground color to yellow
Source§

fn on_yellow(&self) -> BgColorDisplay<'_, Yellow, Self>

Change the background color to yellow
Source§

fn blue(&self) -> FgColorDisplay<'_, Blue, Self>

Change the foreground color to blue
Source§

fn on_blue(&self) -> BgColorDisplay<'_, Blue, Self>

Change the background color to blue
Source§

fn magenta(&self) -> FgColorDisplay<'_, Magenta, Self>

Change the foreground color to magenta
Source§

fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>

Change the background color to magenta
Source§

fn purple(&self) -> FgColorDisplay<'_, Magenta, Self>

Change the foreground color to purple
Source§

fn on_purple(&self) -> BgColorDisplay<'_, Magenta, Self>

Change the background color to purple
Source§

fn cyan(&self) -> FgColorDisplay<'_, Cyan, Self>

Change the foreground color to cyan
Source§

fn on_cyan(&self) -> BgColorDisplay<'_, Cyan, Self>

Change the background color to cyan
Source§

fn white(&self) -> FgColorDisplay<'_, White, Self>

Change the foreground color to white
Source§

fn on_white(&self) -> BgColorDisplay<'_, White, Self>

Change the background color to white
Source§

fn default_color(&self) -> FgColorDisplay<'_, Default, Self>

Change the foreground color to the terminal default
Source§

fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>

Change the background color to the terminal default
Source§

fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>

Change the foreground color to bright black
Source§

fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>

Change the background color to bright black
Source§

fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>

Change the foreground color to bright red
Source§

fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>

Change the background color to bright red
Source§

fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>

Change the foreground color to bright green
Source§

fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>

Change the background color to bright green
Source§

fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>

Change the foreground color to bright yellow
Source§

fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>

Change the background color to bright yellow
Source§

fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>

Change the foreground color to bright blue
Source§

fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>

Change the background color to bright blue
Source§

fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>

Change the foreground color to bright magenta
Source§

fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>

Change the background color to bright magenta
Source§

fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>

Change the foreground color to bright purple
Source§

fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>

Change the background color to bright purple
Source§

fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>

Change the foreground color to bright cyan
Source§

fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>

Change the background color to bright cyan
Source§

fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>

Change the foreground color to bright white
Source§

fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>

Change the background color to bright white
Source§

fn bold(&self) -> BoldDisplay<'_, Self>

Make the text bold
Source§

fn dimmed(&self) -> DimDisplay<'_, Self>

Make the text dim
Source§

fn italic(&self) -> ItalicDisplay<'_, Self>

Make the text italicized
Source§

fn underline(&self) -> UnderlineDisplay<'_, Self>

Make the text underlined
Make the text blink
Make the text blink (but fast!)
Source§

fn reversed(&self) -> ReversedDisplay<'_, Self>

Swap the foreground and background colors
Source§

fn hidden(&self) -> HiddenDisplay<'_, Self>

Hide the text
Source§

fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>

Cross out the text
Source§

fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>
where Color: DynColor,

Set the foreground color at runtime. Only use if you do not know which color will be used at compile-time. If the color is constant, use either OwoColorize::fg or a color-specific method, such as OwoColorize::green, Read more
Source§

fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>
where Color: DynColor,

Set the background color at runtime. Only use if you do not know what color to use at compile-time. If the color is constant, use either OwoColorize::bg or a color-specific method, such as OwoColorize::on_yellow, Read more
Source§

fn fg_rgb<const R: u8, const G: u8, const B: u8>( &self, ) -> FgColorDisplay<'_, CustomColor<R, G, B>, Self>

Set the foreground color to a specific RGB value.
Source§

fn bg_rgb<const R: u8, const G: u8, const B: u8>( &self, ) -> BgColorDisplay<'_, CustomColor<R, G, B>, Self>

Set the background color to a specific RGB value.
Source§

fn truecolor(&self, r: u8, g: u8, b: u8) -> FgDynColorDisplay<'_, Rgb, Self>

Sets the foreground color to an RGB value.
Source§

fn on_truecolor(&self, r: u8, g: u8, b: u8) -> BgDynColorDisplay<'_, Rgb, Self>

Sets the background color to an RGB value.
Source§

fn style(&self, style: Style) -> Styled<&Self>

Apply a runtime-determined style
Source§

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

Source§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
where Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
Source§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R
where R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
Source§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R
where R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
Source§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
where Self: Borrow<B>, B: 'a + ?Sized, R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
Source§

fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
where Self: BorrowMut<B>, B: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe function. Read more
Source§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
where Self: AsRef<U>, U: 'a + ?Sized, R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
Source§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
where Self: AsMut<U>, U: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe function.
Source§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
where Self: Deref<Target = T>, T: 'a + ?Sized, R: 'a,

Borrows self, then passes self.deref() into the pipe function.
Source§

fn pipe_deref_mut<'a, T, R>( &'a mut self, func: impl FnOnce(&'a mut T) -> R, ) -> R
where Self: DerefMut<Target = T> + Deref, T: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe function.
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Pointee for T

Source§

type Pointer = u32

Source§

fn debug( pointer: <T as Pointee>::Pointer, f: &mut Formatter<'_>, ) -> Result<(), Error>

Source§

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

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> Tap for T

Source§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
Source§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
Source§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
Source§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
Source§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
Source§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
Source§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
Source§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
Source§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
Source§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release builds.
Source§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release builds.
Source§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release builds.
Source§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release builds.
Source§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release builds.
Source§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release builds.
Source§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release builds.
Source§

impl<T> TryConv for T

Source§

fn try_conv<T>(self) -> Result<T, Self::Error>
where Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
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,