pub struct ExLine(/* private fields */);Expand description
The ex-line: CaretLine plus the wire shape escriba-api publishes.
The editing logic is NOT here — it is CaretLine, in memori, because the
search prompt needs the identical thing and the two crates cannot see each
other. What is left is the one thing that IS this crate’s business: the
published JSON says minibuffer, and a positioning primitive has no
reason to know that word.
§Wire shape
#[serde(flatten)]ed into ModalState::Command, so the schema reads
{"mode": "Command", "minibuffer": "wq", "caret": 1} — unchanged by
either the field-folding or the move down to memori.
Implementations§
Source§impl ExLine
impl ExLine
Sourcepub fn push_str(&mut self, s: &str)
pub fn push_str(&mut self, s: &str)
Append a raw fragment and park the caret at the end.
Appends rather than inserting on purpose: its caller is the command
registry’s __quit__ sentinel handshake, writing a fragment the user
did not type.
Sourcepub fn move_caret(&mut self, to: CaretMove)
pub fn move_caret(&mut self, to: CaretMove)
Move the caret.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ExLine
impl<'de> Deserialize<'de> for ExLine
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for ExLine
Source§impl JsonSchema for ExLine
impl JsonSchema for ExLine
Source§fn schema_name() -> String
fn schema_name() -> String
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
$ref keyword. Read more