Skip to main content

Settings

Struct Settings 

Source
pub struct Settings {
Show 18 fields pub csaf_mode: String, pub theme: String, pub import_directory: String, pub export_directory: String, pub dump_directory: String, pub sidecar_sha256: bool, pub sidecar_sha3_512: bool, pub naming_convention: String, pub publisher_name: String, pub publisher_namespace: String, pub publisher_category: String, pub publisher_contact_details: String, pub tlp_default: String, pub verschlusssache_enabled: bool, pub verschlusssache_default: String, pub nato_enabled: bool, pub nato_default: String, pub classification_storage_mode: String,
}
Expand description

Application settings stored in redb.

Fields§

§csaf_mode: String

CSAF mode: "2.0" or "2.1".

§theme: String

UI theme: "light" or "dark".

§import_directory: String

Directory to scan for CSAF imports.

§export_directory: String

Directory to export CSAF files to.

§dump_directory: String

Directory to write full database dumps + hash sidecars to.

§sidecar_sha256: bool

Whether to generate SHA-256 sidecar files.

§sidecar_sha3_512: bool

Whether to generate SHA3-512 sidecar files.

§naming_convention: String

Naming convention prefix for CSAF files.

§publisher_name: String

Default publisher name injected into new CSAF documents.

§publisher_namespace: String

Default publisher namespace URI.

§publisher_category: String

Default publisher category (vendor, discoverer, coordinator, user, translator, other).

§publisher_contact_details: String

Default publisher contact details (email or URL).

§tlp_default: String

Default TLP 2.0 label (one of TLP_LABELS).

§verschlusssache_enabled: bool

Whether the Verschlusssache (German national classification) field is exposed on the CSAF form.

§verschlusssache_default: String

Default Verschlusssache label (one of VERSCHLUSSSACHE_LABELS).

§nato_enabled: bool

Whether the NATO classification field is exposed on the CSAF form.

§nato_default: String

Default NATO classification label (one of NATO_LABELS).

§classification_storage_mode: String

Where to write Verschlusssache / NATO values in the exported CSAF document. One of CLASSIFICATION_STORAGE_MODES: "distribution_text", "notes", or "both".

Trait Implementations§

Source§

impl Clone for Settings

Source§

fn clone(&self) -> Settings

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Settings

Source§

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

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

impl Default for Settings

Source§

fn default() -> Self

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

impl<'de> Deserialize<'de> for Settings

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 PartialEq for Settings

Source§

fn eq(&self, other: &Settings) -> 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.
Source§

impl Serialize for Settings

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 StructuralPartialEq for Settings

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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>,