[][src]Function keebrs::net::background

pub fn background<R, T, N, E>(
    net: N
) -> (impl Future<Output = ()>, Background<R, T>) where
    R: RawMutex,
    N: Net<T> + Unpin,
    N: Stream<Item = Result<Msg<T>, E>>, 

Construct a Background.

Returns the Background object and a Future suitable for spawning. The Background net will do nothing unless its corresponding future is polled as well.