pub struct Settings {
pub managed_settings: Option<PathBuf>,
pub require_root_settings: bool,
pub git: String,
pub git_timeout: Duration,
pub notify: Notify,
pub local_roots: Option<Vec<PathBuf>>,
pub import_dir: Option<PathBuf>,
pub line_cap: usize,
pub proxy: Option<String>,
pub hardened: bool,
}Fields§
§managed_settings: Option<PathBuf>The file hook.bind inspects instead of the one the harness’s profile
names.
require_root_settings: boolRequire managed settings and the hook program to be root-owned.
git: String§git_timeout: DurationHow long one git command may run (fetch and push included).
notify: NotifyHow a freeze or an integrity alarm reaches a human at once.
local_roots: Option<Vec<PathBuf>>Where a local-path remote may lie, besides the backups directory.
None: anywhere outside the daemon home (cooperative). A hardened
daemon starts with an empty list unless told otherwise.
import_dir: Option<PathBuf>Where the developer leaves Git bundles to import or restore (a
hardened install’s --import-dir). Only a bundle directly in it is
read, and only from the daemon’s own copy (import.rs); nothing is
ever pushed there.
line_cap: usizeThe longest response line (MAX_LINE outside tests): blobs
refuses a page that would not fit.
proxy: Option<String>Where the network proxy listens (host:port), for lonca run.
hardened: boolA hardened install: a new repository starts hardened, and one that stands below that is told so.
Implementations§
Source§impl Settings
impl Settings
Sourcepub fn for_daemon(
allow_user_owned: bool,
managed_settings: Option<PathBuf>,
proxy: Option<String>,
hardened: bool,
) -> Self
pub fn for_daemon( allow_user_owned: bool, managed_settings: Option<PathBuf>, proxy: Option<String>, hardened: bool, ) -> Self
What lonca daemon runs with. Administrator files must be root’s
unless it was told otherwise, for a test.
Sourcepub fn proxy_port(&self) -> Option<u16>
pub fn proxy_port(&self) -> Option<u16>
Where the proxy listens, when it listens at an address.
Trait Implementations§
Auto Trait Implementations§
impl Forget for Settings
impl Freeze for Settings
impl Move for Settings
impl RefUnwindSafe for Settings
impl Send for Settings
impl Sync for Settings
impl Unpin for Settings
impl UnsafeUnpin for Settings
impl UnwindSafe for Settings
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more