tangled
alpha
login
or
join now
sachy.dev
/
sachy-embed-core
0
fork
atom
Repo of no-std crates for my personal embedded projects
0
fork
atom
overview
issues
pulls
pipelines
Add txt records to mDNS service struct
sachy.dev
1 week ago
c8fd1460
7f489f33
2/2
miri.yml
success
1min 26s
test.yml
success
1min 24s
+6
-1
1 changed file
expand all
collapse all
unified
split
sachy-mdns
src
service.rs
+6
-1
sachy-mdns/src/service.rs
···
62
62
hostname: String,
63
63
ip: Option<IpAddr>,
64
64
port: u16,
65
65
+
txt: Vec<&'static str>,
65
66
}
66
67
67
68
impl Service {
···
71
72
hostname: impl Into<String>,
72
73
ip: Option<IpAddr>,
73
74
port: u16,
75
75
+
txt: impl Into<Vec<&'static str>>,
74
76
) -> Self {
75
77
let service_type = service_type.into();
76
78
let mut instance = instance.into();
···
86
88
hostname,
87
89
ip,
88
90
port,
91
91
+
txt: txt.into(),
89
92
}
90
93
}
91
94
···
142
145
atype: QType::TXT,
143
146
aclass,
144
147
ttl: 120,
145
145
-
record: Record::TXT(TXT { text: Vec::new() }),
148
148
+
record: Record::TXT(TXT {
149
149
+
text: self.txt.clone(),
150
150
+
}),
146
151
})
147
152
}
148
153