Skip to main content

write_tree

Function write_tree 

Source
pub fn write_tree(
    session: &mut SerdeSession<Flm>,
    tree: &Arc<NodeTree<Flm>>,
) -> Result<TreeIndex, SerializeError>
Expand description

Writes tree into the trees table of session and returns its position, which belongs to session.

The tree is written by its Arc, without a copy; writing the same Arc again returns the existing position. Call this function on a worker thread (see the module documentation).

§Errors

SerializeError::UnknownTableName if the session has no trees table; the other errors of techy’s writing (interning) of an object.