2021-10-21 04:18:41 +00:00
|
|
|
//! Version 0 Prefstrings
|
|
|
|
|
2021-10-21 18:37:37 +00:00
|
|
|
use crate::{
|
|
|
|
InstanceSettings,
|
|
|
|
user_preferences::Preference,
|
|
|
|
WeightedTable,
|
|
|
|
};
|
2021-10-21 04:18:41 +00:00
|
|
|
|
|
|
|
/// A parsed version of the V0 prefstring
|
|
|
|
///
|
|
|
|
/// See the [prefstring specification][1] for more information about how this is interpretted.
|
|
|
|
///
|
|
|
|
/// [1]: https://fem.mint.lgbt/Emi/PronounsToday/raw/branch/main/doc/User-Preference-String-Spec.txt
|
2021-10-21 19:05:52 +00:00
|
|
|
pub struct UserPreferencesV0 {
|
2021-10-21 04:18:41 +00:00
|
|
|
default_weight: u8,
|
|
|
|
default_enabled: bool,
|
|
|
|
}
|
|
|
|
|
2021-10-21 19:05:52 +00:00
|
|
|
impl Preference for UserPreferencesV0 {
|
|
|
|
fn into_weighted_table<'a>(&self, settings: &'a InstanceSettings) -> WeightedTable<'a> {
|
2021-10-21 04:18:41 +00:00
|
|
|
todo!()
|
|
|
|
}
|
|
|
|
|
2021-10-21 19:05:52 +00:00
|
|
|
fn from_prefstring_bytes(bytes: &[u8]) -> Self {
|
2021-10-21 04:18:41 +00:00
|
|
|
todo!()
|
|
|
|
}
|
|
|
|
|
|
|
|
fn into_prefstring_bytes(&self) -> Vec<u8> {
|
|
|
|
todo!()
|
|
|
|
}
|
|
|
|
}
|