pub struct ConfigChange {
pub port: &'static str,
pub previous: Value,
pub next: Value,
pub policy: ConfigPolicy,
}Expand description
Record of a configuration value change after sanitization.
use daedalus_runtime::config::{ConfigChange, ConfigPolicy};
use daedalus_data::model::Value;
let change = ConfigChange {
port: "threshold",
previous: Value::Int(0),
next: Value::Int(1),
policy: ConfigPolicy::Clamp,
};
assert_eq!(change.port, "threshold");Fields§
§port: &'static str§previous: Value§next: Value§policy: ConfigPolicyTrait Implementations§
Source§impl Clone for ConfigChange
impl Clone for ConfigChange
Source§fn clone(&self) -> ConfigChange
fn clone(&self) -> ConfigChange
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ConfigChange
impl Debug for ConfigChange
Source§impl PartialEq for ConfigChange
impl PartialEq for ConfigChange
impl StructuralPartialEq for ConfigChange
Auto Trait Implementations§
impl Freeze for ConfigChange
impl RefUnwindSafe for ConfigChange
impl Send for ConfigChange
impl Sync for ConfigChange
impl Unpin for ConfigChange
impl UnwindSafe for ConfigChange
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
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>
Converts
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>
Converts
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