1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
use std::collections::HashMap;
use crate::internal::prelude::*;
#[derive(Debug, Clone, Default)]
pub struct EditThread(pub HashMap<&'static str, Value>);
impl EditThread {
pub fn name<D: ToString>(&mut self, name: D) -> &mut Self {
self.0.insert("name", Value::String(name.to_string()));
self
}
pub fn auto_archive_duration(&mut self, duration: u16) -> &mut Self {
self.0.insert("auto_archive_duration", Value::Number(Number::from(duration)));
self
}
pub fn archived(&mut self, archived: bool) -> &mut Self {
self.0.insert("archived", Value::Bool(archived));
self
}
pub fn locked(&mut self, lock: bool) -> &mut Self {
self.0.insert("locked", Value::Bool(lock));
self
}
pub fn invitable(&mut self, invitable: bool) -> &mut Self {
self.0.insert("invitable", Value::Bool(invitable));
self
}
}