DaemonConfig

Struct DaemonConfig 

pub struct DaemonConfig {
    pub height: i32,
    pub aspect_ratio_adjustement: f64,
    pub console_color: u16,
}
Expand description

Representation of the daemon subcommand configurations.

Fields§

§height: i32

Height in pixel of the daemon console window.

Note: we are DPI Unaware which means the number of pixels represents the logical scale, not the physical.

§aspect_ratio_adjustement: f64

Controls how the client console windows make use of the available screen space.

  • > 0.0 - Aims for vertical rectangle shape. The larger the value, the more exaggerated the “verticality”. Eventually the windows will all be columns.
  • = 0.0 - Aims for square shape.
  • < 0.0 - Aims for horizontal rectangle shape. The smaller the value, the more exaggerated the “horizontality”. Eventually the windows will all be rows. -1.0 is the sweetspot for mostly preserving a 16:9 ratio.
§console_color: u16

Controls back- and foreground colors of the daemon console window.

All standard windows color combinations are available:

FOREGROUND_BLUE: 1
FOREGROUND_GREEN: 2
FOREGROUND_RED: 4
FOREGROUND_INTENSITY: 8
BACKGROUND_BLUE: 16
BACKGROUND_GREEN: 32
BACKGROUND_RED: 64
BACKGROUND_INTENSITY: 128 \

§Example

White font on red background: 8 + 4 + 2 + 1 + 128 + 64 = 207

Trait Implementations§

§

impl Debug for DaemonConfig

§

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

Formats the value using the given formatter. Read more
§

impl Default for DaemonConfig

§

fn default() -> Self

Returns a sensible default DaemonConfig.

§Returns

DaemonConfig with the following values:

  • height - 200
  • aspect_ratio_adjustment - -1.0
  • console_color - 207
§

impl<'de> Deserialize<'de> for DaemonConfig

§

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

Deserialize this value from the given Serde deserializer. Read more
§

impl From<DaemonConfig> for DaemonConfigOpt

§

fn from(val: DaemonConfig) -> Self

Wraps all configuration values as options.

§

impl From<DaemonConfigOpt> for DaemonConfig

§

fn from(val: DaemonConfigOpt) -> Self

Unwraps the existing configuration values or applies the default.

§

impl PartialEq for DaemonConfig

§

fn eq(&self, other: &DaemonConfig) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
§

impl Serialize for DaemonConfig

§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
§

impl StructuralPartialEq for DaemonConfig

Auto Trait Implementations§

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

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

Source§

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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

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

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

Performs the conversion.
Source§

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

Source§

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

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

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>,