pub trait Editor<T>: Deref<Target = T> + DerefMut<Target = T> {
// Required method
fn commit(self: Box<Self>) -> Result<(), Error>;
}Expand description
An editor handle for a single file in a Workspace.
The parsed value is reachable via Deref/DerefMut; mutate it as you
would the bare type. Changes are persisted by calling
commit. Dropping an editor without committing discards
the changes (and emits a warning) — explicit commit is required so that
serialisation failures can be reported.
T is the parsed representation (e.g.
debian_control::lossless::Control).
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".