Skip to main content

build_log

Function build_log 

Source
pub async fn build_log(config: &LogConfig) -> Result<Box<dyn Log>, LogError>
Expand description

Build a boxed Log from a LogConfig.

async (NEW-156, feature 012): the File variant now opens a channel + background-writer backed FileLog (see its doc for why that constructor requires an active Tokio runtime). The recursive Composite call is boxed (Box::pin) since Rust can’t otherwise size a self-recursive async fn’s future.