]> git.proxmox.com Git - perlmod.git/commit - perlmod-macro/src/attribs.rs
add 'raw_return' function attribute
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Tue, 24 Nov 2020 08:36:50 +0000 (09:36 +0100)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Tue, 24 Nov 2020 08:37:59 +0000 (09:37 +0100)
commit29e61fa65e60d1827c1f7c7507de898db29a8644
tree1a9d1979aaec9d082ab32042afc8dcb10d2fe566
parent568aba2b758c8a98924a6805d3b2c1d2176f28d6
add 'raw_return' function attribute

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>
perlmod-macro/src/attribs.rs
perlmod-macro/src/function.rs
perlmod-macro/src/module.rs
perlmod-test/src/bless.rs [new file with mode: 0644]
perlmod-test/src/lib.rs
perlmod/src/value.rs