Struct egui_memory_editor::MemoryEditor[][src]

pub struct MemoryEditor<T> {
    pub options: MemoryEditorOptions,
    // some fields omitted
}
Expand description

The main struct for the editor window. This should persist between frames as it keeps track of quite a bit of state.

Fields

options: MemoryEditorOptions

A collection of options relevant for the MemoryEditor window. Can optionally be serialized/deserialized with serde

Implementations

Create the MemoryEditor, which should be kept in memory between frames.

The read_function should return one u8 value from the object which you provide in either the Self::window_ui or the Self::draw_editor_contents method.

let mut memory_base = vec![0xFF; 0xFF];
let mut memory_editor: MemoryEditor<Vec<u8>> = MemoryEditor::new(|memory, address| memory[address]);

Create a window and render the memory editor contents within.

If you want to make your own window/container to be used for the editor contents, you can use Self::draw_editor_contents.

Draws the actual memory viewer/editor.

Can be included in whatever container you want.

Use Self::window_ui if you want to have a window with the contents instead.

Set the window title, only relevant if using the window_ui() call.

Set the function used to write to the provided object T.

This will give the UI write capabilities, and will therefore no longer be read_only.

Add an address range to the range list. Multiple address ranges can be added, and will be displayed in the UI by a drop-down box if more than one range was added.

The first range that is added will be displayed by default when launching the UI.

The UI will query your set read_function with the values within this Range

Set the memory options, useful if you use the persistence feature.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.