Crate cursive_hexview [] [src]

A simple HexView for cursive.

It is meant to display a data of u8 and format them like e.g. hexdump does. You can interact with the view with your keyboard. Currently the following keys are implemented:

Key Action
Move the cursor to the next, left nibble. If already on the left edge of the view, the event will be "ignored", which means the outer view will handle the event (e.g. focus the view next to this one)
Move the cursor to the next, right nibble. If already on the right edge of the view, the event will be "ignored", which means the outer view will handle the event (e.g. focus the view next to this one)
Move the cursor to the previous line. If already on the top edge of the view, the event will be "ignored", which means the outer view will handle the event (e.g. focus the view next to this one)
Move the cursor to the next line. If already on the bottom edge of the,view, the event will be "ignored", which means the outer view will handle the event (e.g. focus the view next to this one)
Home Move the cursor to the beginning of the current line.
End Move the cursor to the end of the current line.
Shift + Home Move the cursor to position (0 ,0) which means to the beginning of the view.
Shift + End Move the cursor to the last nibble in the view.
+ Increase the amount of data by one byte. It will be filled up with 0.
- Decrease the amount of data by one. Any data that will leave the viewable area, will be permanantly lost.
0-9, a-f Set the nibble under the cursor to the corresponding hex value. Note, that this is only available in the editable state, see DisplayState and set_display_state

Structs

HexView

This is a classic hexview which can be used to view and manipulate data which resides inside this struct. There are severeal states in which the view can be operatered, see DisplayState. You should consider the corresponding method docs for each state.

Enums

DisplayState

This enum is used for the set_display_state method and controls the interaction inside of the cursive environment.