pub trait Format: Sealed {
// Required method
fn format<W>(&self, fmt: &mut Formatter<'_, W>) -> Result<()>
where W: Write;
// Provided methods
fn format_vec<W>(&self, fmt: &mut Formatter<'_, W>) -> Result<Vec<u8>>
where W: Write + AsMut<Vec<u8>> { ... }
fn format_string<W>(&self, fmt: &mut Formatter<'_, W>) -> Result<String>
where W: Write + AsMut<Vec<u8>> { ... }
}
Expand description
A trait to format data structures as HCL.
This trait is sealed to prevent implementation outside of this crate.
Required Methods§
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.