abpl 0.1.0

A collection of Rust boilerplate: a reloadable-systemd-service lifecycle helper, a hot-reloading axum wrapper, a serializable/typed error derive macro, and small utility newtypes.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use super::HotReloadAxumError;
use crate::providers::ProvidesExitCode;

// `HotReloadingAxumService::bind_sockets` and friends actually spawn OS threads, dedicated tokio
// runtimes, and bind real sockets to serve real axum requests -- that's the OS-interaction shell
// left untested here. `HotReloadAxumError` is the one piece of pure logic in this file, and is
// covered below.

#[test]
fn display_and_exit_code() {
	let err = HotReloadAxumError {};
	assert_eq!(err.to_string(), "no sockets could be listened to");
	assert_eq!(err.exit_code(), crate::app::consts::EX_CONFIG.into());
}