Skip to main content

write_nar

Function write_nar 

Source
pub async fn write_nar<W, BS, DS>(
    w: W,
    root_node: &Node,
    blob_service: BS,
    directory_service: DS,
) -> Result<(), RenderError>
Expand description

Accepts a Node pointing to the root of a (store) path, and uses the passed blob_service and directory_service to perform the necessary lookups as it traverses the structure. The contents in NAR serialization are writen to the passed AsyncWrite.

This function is very linear, so roundtrip times add up quickly. You might want to use crate::nar::write_nar instead, which opens more blobs concurrently.