pub struct Setting<T> {
pub key: &'static str,
pub doc: &'static str,
pub default: fn() -> T,
pub reload: Reload,
pub sensitivity: Sensitivity,
pub scope: Scope,
pub remote: bool,
pub critical: bool,
/* private fields */
}Expand description
A setting, declared once by the subsystem it governs — usually through
setting!.
Fields§
§key: &'static strDotted, each segment [a-z][a-z0-9_]*: transport.insecure_ws.
doc: &'static strWhat it governs, in a line.
default: fn() -> T§reload: Reload§sensitivity: Sensitivity§scope: Scope§remote: boolSettable over the wire (the config activation); false: only from
the host’s code or the file.
critical: boolOver the wire, admin only and only as a confirmed commit (SIGN-1:
later signed(hardware, uv)).
Implementations§
Source§impl<T> Setting<T>
impl<T> Setting<T>
Sourcepub const fn new(key: &'static str, default: fn() -> T) -> Self
pub const fn new(key: &'static str, default: fn() -> T) -> Self
key with default: live, public, the service’s, settable over the
wire, not critical.
pub const fn reload(self, r: Reload) -> Self
pub const fn sensitivity(self, s: Sensitivity) -> Self
pub const fn scope(self, s: Scope) -> Self
pub const fn remote(self, r: bool) -> Self
pub const fn critical(self, c: bool) -> Self
pub const fn doc(self, d: &'static str) -> Self
Trait Implementations§
Auto Trait Implementations§
impl<T> Forget for Setting<T>
impl<T> Freeze for Setting<T>
impl<T> Move for Setting<T>
impl<T> RefUnwindSafe for Setting<T>
impl<T> Send for Setting<T>
impl<T> Sync for Setting<T>
impl<T> Unpin for Setting<T>
impl<T> UnsafeUnpin for Setting<T>
impl<T> UnwindSafe for Setting<T>
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