]>
git.proxmox.com Git - perlmod.git/blob - perlmod-test/src/pkg142.rs
1 use serde
::{Deserialize, Serialize}
;
5 #[derive(Debug, Deserialize, Serialize)]
6 pub struct Blubber(String
);
8 #[derive(Debug, Deserialize, Serialize)]
15 #[perlmod::package(name = "RSPM::Foo142", lib = "perlmod_test")]
17 use anyhow
::{bail, Error}
;
22 fn foo142(a
: u32, b
: u32) -> Result
<u32, Error
> {
24 bail
!("dying on magic number");
31 fn test(t
: Option
<String
>) -> Result
<(), Error
> {
32 println
!("test called with {:?}", t
);
37 fn teststr(t
: Option
<&str>) -> Result
<(), Error
> {
38 println
!("teststr called with {:?}", t
);
43 fn test_serde(value
: super::Blubber
) -> Result
<String
, Error
> {
44 println
!("got {:?}", value
);
49 fn test_refs(data
: super::RawRefs
) -> Result
<Value
, Error
> {
50 println
!("test_refs: copied text: {:?}", data
.copied
);
55 #[perlmod::package(name = "RSPM::EnvVarLibrary", lib = "x-${CARGO_PKG_NAME}-y")]
60 fn test_lib_env_vars(value
: &str) -> Result
<(), Error
> {
61 println
!("foo: {:?}", value
);