pub trait Document {
// Required method
fn ty() -> Type;
}
Expand description
A type that can be pretty-printed by Doku.
Usually you’ll get this by adding #[derive(Document)]
to your type:
use doku::Document;
#[derive(Document)]
struct Foo;
… but implementing it manually will be required if you’re using a custom serializer / deserializer (see: the examples directory).
Required 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.