Allow deserializing things such as `&[u8]` to reference the
original data instead of requiring a `Vec<u8>` instead.
Introduces `perlmod::from_ref_value` next to
`perlmod::from_value` with a new signature.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
The `make_package` macro is tedious to use. We now simply
depend on new-enough rustc for `package` to work.
The change to #[export] allows writing:
#[export(name = "DESTROY")]
fn destroy(#[raw] this: Value) { ... }
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
A function declared with a raw_return attribute like this:
#[export(raw_return)]
fn foo() -> Result<Value, Error>;
will not perform serialization on the 'Value', but return
the "raw" value to perl. This allows returning blessed
values.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>