mirror of
https://git.proxmox.com/git/perlmod
synced 2025-10-04 22:07:05 +00:00
perlmod: expose ser::is_active
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
parent
f605d7cf0c
commit
cac2982a8b
@ -9,6 +9,14 @@ use crate::{array, hash, raw_value};
|
|||||||
/// Perl [`Value`](crate::Value) serializer.
|
/// Perl [`Value`](crate::Value) serializer.
|
||||||
struct Serializer;
|
struct Serializer;
|
||||||
|
|
||||||
|
/// Check if the `perlmod::Serializer` is currently being used for serialization.
|
||||||
|
///
|
||||||
|
/// External structs can use this to determine whether serializing a `RawValue` containing an xsub
|
||||||
|
/// will be serialized into perl in a meaningful way.
|
||||||
|
pub fn is_active() -> bool {
|
||||||
|
raw_value::is_enabled()
|
||||||
|
}
|
||||||
|
|
||||||
/// Serialize data into a perl [`Value`](crate::Value).
|
/// Serialize data into a perl [`Value`](crate::Value).
|
||||||
///
|
///
|
||||||
/// Note that in theory it should be safe to send such values to different threads as long as their
|
/// Note that in theory it should be safe to send such values to different threads as long as their
|
||||||
|
Loading…
Reference in New Issue
Block a user