pub struct AppConfig {
pub bind: SocketAddr,
pub scan_capacity: usize,
pub scans_dir: Option<PathBuf>,
}Expand description
Server configuration.
bind is the TCP socket the server listens on; defaults are
imposed by the caller (the CLI binds 127.0.0.1:8765 and refuses
to bind a non-loopback address unless explicitly told to — there
is no authentication on the API).
Fields§
§bind: SocketAddrAddress to bind the HTTP listener.
scan_capacity: usizeMaximum number of recent scans retained in memory.
scans_dir: Option<PathBuf>Directory for on-disk scan history. None disables persistence.
The CLI defaults to default_scans_dir.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AppConfig
impl RefUnwindSafe for AppConfig
impl Send for AppConfig
impl Sync for AppConfig
impl Unpin for AppConfig
impl UnsafeUnpin for AppConfig
impl UnwindSafe for AppConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more