pub trait WithTypeDecs: Sized {
// Required methods
fn type_decs(&self) -> &[TypeDec];
fn add_type_dec<D>(&mut self, type_dec: D)
where D: Into<TypeDec>;
// Provided methods
fn with_type_dec<D>(self, type_dec: D) -> Self
where D: Into<TypeDec> { ... }
fn write_type_decs(&self, b: &mut CodeBuffer, level: usize) { ... }
}Expand description
An element with type declarations.
Required Methods§
Sourcefn add_type_dec<D>(&mut self, type_dec: D)
fn add_type_dec<D>(&mut self, type_dec: D)
Adds the type_dec.
Provided Methods§
Sourcefn with_type_dec<D>(self, type_dec: D) -> Self
fn with_type_dec<D>(self, type_dec: D) -> Self
Adds the type_dec.
Sourcefn write_type_decs(&self, b: &mut CodeBuffer, level: usize)
fn write_type_decs(&self, b: &mut CodeBuffer, level: usize)
Writes the type declarations.
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.