1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
//! `Rv<T>` — typed reference SV (`\$scalar`, `\@array`, `\%hash`).
//!
//! `Rv<T>` is at the C level just an `SV` whose body holds a pointer
//! to another SV / AV / HV. The `T` type parameter is a Rust-side hint
//! for what's at the other end — it makes `Av::into_rv` return
//! `Rv<Av>` instead of an opaque `Rv`, so the caller's intent shows up
//! in signatures.
//!
//! `Rv<T>` is constructed via [`Av::into_rv`](crate::Av::into_rv) /
//! [`Hv::into_rv`](crate::Hv::into_rv); both produce a fresh mortal
//! RV so the proc-macro can push it directly without further refcount
//! bookkeeping.
use PhantomData;
use SV;
use crateSv;