serialise_bytes: Serialise and unserialise objects

Description Usage Arguments

View source: R/serial.R

Description

These functions are equivalent to base::serialize() and base::unserialize() but try to preserve the enclosure of closures, formulas, and quosures. It works by detecting which environment or package attached on the search path at serialisation-time are required by the function or quosure. The relevant environments are then reconstructed in a fake search path when the object is unserialised. The fake search path is specific to each closure and quosure.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
serialise_bytes(x, global_env = FALSE)

## Default S3 method:
serialise_bytes(x, global_env = FALSE)

bytes_unserialise(bytes)

## Default S3 method:
bytes_unserialise(bytes)

serialize_bytes(x, global_env = FALSE)

bytes_unserialize(bytes)

Arguments

x

An object to serialise.

global_env

Whether to include a stripped version of the global environment as part of the fake search path constructed around closures.

bytes

A raw vector to unserialise.


lionel-/rlanglabs documentation built on May 29, 2019, 2:57 p.m.