
Serialise an object to bytes
to_bytes.RdSerialises the Rust neighbour graph of a SingleCellConnectivity into a raw
vector, which survives saveRDS() and qs2 where the pointer does not. The
build method rides along as the attribute method. Read it back with
from_bytes().
Examples
conn <- as_sc_connectivity(igraph::make_graph("Zachary"))
bytes <- to_bytes(conn)
from_bytes(bytes)
#> SingleCellConnectivity: 34 cells, 78 edges
#> Method: NA