Skip to main content

ConfigPatch

Struct ConfigPatch 

Source
pub struct ConfigPatch {
    pub version: Option<u8>,
    pub connection: Option<ConnectionType>,
    pub ip_method: Option<IpMethod>,
    pub led_brightness: Option<u8>,
    pub station_config: Option<WifiConfigPatch>,
    pub ap_config: Option<WifiConfigPatch>,
    pub dmx_ports: FnvIndexMap<u8, DmxPortPatch, MAX_DMX_PORTS>,
    pub button_actions: FnvIndexMap<u8, ButtonAction, MAX_BUTTON_ACTIONS>,
}
Expand description

Partial configuration (web: DeepPartial<Config>).

Every field is optional — including nested objects: credentials and DMX-port entries arrive leaf by leaf (the UI only sends changed leaves) and merge field-wise onto the stored values.

Fields§

§version: Option<u8>

Optional schema version.

§connection: Option<ConnectionType>

Optional connection type.

§ip_method: Option<IpMethod>

Optional IP method.

§led_brightness: Option<u8>

Optional LED brightness.

§station_config: Option<WifiConfigPatch>

Optional station credentials (fields merge individually).

§ap_config: Option<WifiConfigPatch>

Optional access-point credentials (fields merge individually).

§dmx_ports: FnvIndexMap<u8, DmxPortPatch, MAX_DMX_PORTS>

Optional per-port overrides (merged per key and field).

§button_actions: FnvIndexMap<u8, ButtonAction, MAX_BUTTON_ACTIONS>

Optional per-button overrides (merged per key).

Trait Implementations§

Source§

impl Debug for ConfigPatch

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for ConfigPatch

Source§

fn default() -> ConfigPatch

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for ConfigPatch

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more

Auto Trait Implementations§

§

impl Freeze for ConfigPatch

§

impl RefUnwindSafe for ConfigPatch

§

impl Send for ConfigPatch

§

impl Sync for ConfigPatch

§

impl Unpin for ConfigPatch

§

impl UnsafeUnpin for ConfigPatch

§

impl UnwindSafe for ConfigPatch

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,