rkyv_impl

Implement methods for Foo and ArchivedFoo in a single impl block.

```rust use rkyv::Archive; use rkyv_impl::*; use std::iter::Sum;

[derive(Archive)]

struct Foo { elements: Vec }

[archiveimpl(transformbounds(T))]

impl Foo { // Notice that the where clause is transformed so that // T is replaced with T::Archived in the generated impl. #[archivemethod(transformbounds(T))] fn sum(&self) -> S where T: Clone, S: Sum { self.elements.iter().cloned().sum() } }

fn usegeneratedmethod(foo: &ArchivedFoo) { // Call the generated method! let _ = foo.sum::(); } ```