pub struct MorseEncoder<const MSG_MAX: usize> {
pub message: Message<MSG_MAX>,
/* private fields */
}Fields§
§message: Message<MSG_MAX>Implementations§
source§impl<const MSG_MAX: usize> MorseEncoder<MSG_MAX>
impl<const MSG_MAX: usize> MorseEncoder<MSG_MAX>
sourcepub fn encode_character(&mut self, ch: &u8) -> Result<(), &str>
pub fn encode_character(&mut self, ch: &u8) -> Result<(), &str>
Encode a single character at the edit position and add it both to the message and encoded_message.
sourcepub fn encode_slice(&mut self, str_slice: &str) -> Result<(), &str>
pub fn encode_slice(&mut self, str_slice: &str) -> Result<(), &str>
Encode a &str slice at the edit position and add it both to the message and encoded message.
sourcepub fn encode_message_all(&mut self)
pub fn encode_message_all(&mut self)
Encode the entire message and save it to encoded_message.
sourcepub fn get_last_char_as_morse_charray(&self) -> Option<MorseCharray>
pub fn get_last_char_as_morse_charray(&self) -> Option<MorseCharray>
Get last encoded message character as Option<u8> byte arrays of morse code.
Arrays will have a fixed length of MORSE_ARRAY_LENGTH and if there’s no
signal the option will be None.
sourcepub fn get_last_char_as_sdm(&self) -> Option<SDMArray>
pub fn get_last_char_as_sdm(&self) -> Option<SDMArray>
Get last encoded message character as Option<SDM> arrays of morse code.
The multiplier values then can be used to calculate durations of individual
signals to play or animate the morse code.
sourcepub fn get_encoded_message_as_morse_charrays(
&self,
) -> impl Iterator<Item = Option<MorseCharray>> + '_
pub fn get_encoded_message_as_morse_charrays( &self, ) -> impl Iterator<Item = Option<MorseCharray>> + '_
Get an iterator to encoded message as Option<u8> byte arrays of morse code.
Arrays will have a fixed length of MORSE_ARRAY_LENGTH and if there’s no
signal the option will be None.
sourcepub fn get_encoded_message_as_sdm_arrays(
&self,
) -> impl Iterator<Item = Option<SDMArray>> + '_
pub fn get_encoded_message_as_sdm_arrays( &self, ) -> impl Iterator<Item = Option<SDMArray>> + '_
Get an iterator to entire encoded message as Option<SDM> arrays of morse code.
The multiplier values then can be used to calculate durations of individual
signals to play or animate the morse code.