pub fn boxed_source<S: SnapshotSource + 'static>(
source: S,
) -> BoxedSnapshotSourceExpand description
Box a SnapshotSource into the BoxedSnapshotSource alias
expected by EntropySender::run.
ยงExamples
use dynomite::entropy::{boxed_source, send::StaticSnapshot, SnapshotSource};
let s = boxed_source(StaticSnapshot::new(vec![1, 2, 3]));
assert_eq!(s.snapshot().unwrap(), vec![1, 2, 3]);