ConfigContextSettings

Struct ConfigContextSettings 

Source
pub struct ConfigContextSettings {
    pub(crate) purpose: ConfigPurpose,
    pub(crate) context: ConfigContext,
    pub(crate) technology_settings: ConfigTechnologySettings,
}
Expand description

Settings for a specific context in a VOA purpose.

This is a specialization for a specific context, which overrides any default technology settings set on an OS level.

Fields§

§purpose: ConfigPurpose

The VOA purpose for this override.

§context: ConfigContext

The VOA context for this override.

§technology_settings: ConfigTechnologySettings

The specific technology settings.

Implementations§

Source§

impl ConfigContextSettings

Source

pub fn new( purpose: impl Into<ConfigPurpose>, context: impl Into<ConfigContext>, technologies: ConfigTechnologySettings, ) -> Self

Creates a new ConfigContextSettings.

Source

pub fn purpose(&self) -> &Purpose

Returns a reference to the Purpose.

Source

pub fn context(&self) -> &Context

Returns a reference to the Context.

Source

pub fn config_technology_settings(&self) -> &ConfigTechnologySettings

Returns a reference to the ConfigTechnologySettings.

Trait Implementations§

Source§

impl Debug for ConfigContextSettings

Source§

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

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

impl<'de> Deserialize<'de> for ConfigContextSettings

Source§

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

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

impl Serialize for ConfigContextSettings

Source§

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

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

impl Validate for ConfigContextSettings

Source§

type Context = ()

A user-provided context. Read more
Source§

fn validate_into( &self, __garde_user_ctx: &Self::Context, __garde_path: &mut dyn FnMut() -> Path, __garde_report: &mut Report, )

Validates Self, aggregating all validation errors into Report.
§

fn validate(&self) -> Result<(), Report>
where Self::Context: Default,

Validates Self, returning an Err with an aggregate of all errors if the validation failed. Read more
§

fn validate_with(&self, ctx: &Self::Context) -> Result<(), Report>

Validates Self, returning an Err with an aggregate of all errors if the validation failed. Read more

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