pub(crate) trait Editable {
type Node: Node;
// Required methods
fn header_text(&self) -> &str;
fn leading(&self) -> (&str, &str);
fn root(&self) -> &Self::Node;
fn root_mut(&mut self) -> &mut Self::Node;
fn set_leading(&mut self, applied: Applied<'_>);
// Provided method
fn apply_header(&mut self, desired: &Self, existing: Existing) { ... }
}Expand description
A parsed document whose root node can be edited in place.
Required Associated Types§
Required Methods§
Sourcefn header_text(&self) -> &str
fn header_text(&self) -> &str
The text of the header comment of this document.
Sourcefn leading(&self) -> (&str, &str)
fn leading(&self) -> (&str, &str)
The text before the first entry as the document root holds it and as the first entry holds it. A format that keeps all of it in one place returns an empty root text.
Sourcefn set_leading(&mut self, applied: Applied<'_>)
fn set_leading(&mut self, applied: Applied<'_>)
Put the leading text of an applied header in place.
Provided Methods§
Sourcefn apply_header(&mut self, desired: &Self, existing: Existing)
fn apply_header(&mut self, desired: &Self, existing: Existing)
Replace the leading comment block of this document with the header
of desired.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".