Expand description
Message struct to hold decoded message or message to be encoded.
Client code can use this to access and manipulate the internal message of MorseDecoder or MorseEncoder:
ⓘ
// Get a decoded message
let decoded_message = decoder.message.as_str();
let decoded_message_chars = decoder.message.as_charray();
// ...Do something with the message...
// Clear the message
decoder.message.clear();
// Set message to something different
// and continue decoding from the end
decoder.message.set_message("SOME INITIAL MESSAGE", true);
// We continue sending signals
decoder.signal_event(125, true);
decoder.signal_event(200, false);
....
// To show an editing cursor on the screen
let editing_position = decoder.message.get_edit_pos();
Structs§
- This struct holds the message in human readable format.
- Message iterator provides a convenient way to iterate over message characters. This doesn’t include empty FILLER chars.