pub trait SerializableSemiring: Semiring + Display {
// Required methods
fn weight_type() -> String;
fn parse_binary(i: &[u8]) -> IResult<&[u8], Self, NomCustomError<&[u8]>>;
fn write_binary<F: Write>(&self, file: &mut F) -> Result<()>;
fn parse_text(i: &str) -> IResult<&str, Self>;
// Provided method
fn write_text<F: Write>(&self, file: &mut F) -> Result<()> { ... }
}Required Methods§
fn weight_type() -> String
fn parse_binary(i: &[u8]) -> IResult<&[u8], Self, NomCustomError<&[u8]>>
fn write_binary<F: Write>(&self, file: &mut F) -> Result<()>
fn parse_text(i: &str) -> IResult<&str, Self>
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.