Skip to main content

CommandMediaContext

Trait CommandMediaContext 

Source
pub trait CommandMediaContext {
    // Required method
    fn attach_media(
        &mut self,
        resolved_path: &Path,
    ) -> Result<MediaAttachmentReceipt, String>;
}
Expand description

Atomic composer/media capability (FEAT-018 D4).

The host performs media validation and composer insertion as one atomic operation. Rejected, missing, unsupported, corrupt, or oversized media leaves composer state unchanged and returns a safe error. Only portable success information crosses the boundary; composer markup, mutable input text, decoder internals, and TUI types never do.

Required Methods§

Source

fn attach_media( &mut self, resolved_path: &Path, ) -> Result<MediaAttachmentReceipt, String>

Validate and insert a resolved media path atomically.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§