pub trait FileFormatUtf8<T>: FileFormat<T> {
// Required methods
fn from_string_buffer(&self, buf: &str) -> Result<T, Self::FormatError>;
fn to_string_buffer(&self, value: &T) -> Result<String, Self::FormatError>;
}Expand description
A trait that indicates a file’s contents will always be valid UTF-8.
Required Methods§
Sourcefn from_string_buffer(&self, buf: &str) -> Result<T, Self::FormatError>
fn from_string_buffer(&self, buf: &str) -> Result<T, Self::FormatError>
Deserialize a buffer from a string slice.
Sourcefn to_string_buffer(&self, value: &T) -> Result<String, Self::FormatError>
fn to_string_buffer(&self, value: &T) -> Result<String, Self::FormatError>
Serialize a value into a string buffer.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".