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
Auto Trait Implementations
impl<T> RefUnwindSafe for MemoryEditor<T>
impl<T> Send for MemoryEditor<T>
impl<T> Sync for MemoryEditor<T>
impl<T> Unpin for MemoryEditor<T>
impl<T> UnwindSafe for MemoryEditor<T>
Blanket Implementations
Mutably borrows from an owned value. Read more