env_lang/struct_envlang.rs
1use std::fmt;
2
3// ------------------------------------------------------------------------------------
4// struct EnvLang
5// ------------------------------------------------------------------------------------
6// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
7// struct
8// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
9#[derive(Clone, Debug, PartialEq)]
10pub struct EnvLang<'a> {
11 pub language: Option<&'a str>,
12 pub localisation: Option<&'a str>,
13 pub charset: Option<&'a str>,
14 pub variant: Option<&'a str>,
15}
16
17// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
18// display
19// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
20impl<'a> fmt::Display for EnvLang<'a> {
21 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
22 write!(f, "EnvLang{{ language: {:?} localisation: {:?} charset: {:?} variant: {:?} }}",self.language, self.localisation, self.charset, self.variant)
23 }
24}