Skip to main content

TextEditorStateAlg

Trait TextEditorStateAlg 

Source
pub trait TextEditorStateAlg {
    // Required methods
    fn active_text_editor(&self) -> Option<(&str, usize)>;
    fn set_active_text_editor(&mut self, text: String, cursor: usize);
}
Expand description

Specifies storage for the text editor active on the current manager page.

Required Methods§

Source

fn active_text_editor(&self) -> Option<(&str, usize)>

Observes active text and its UTF-8 byte cursor.

Source

fn set_active_text_editor(&mut self, text: String, cursor: usize)

Replaces active text and its UTF-8 byte cursor.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§